You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

jpeg_turbo.patch001 2.3 kB

123456789101112131415161718192021222324252627282930313233343536373839
  1. diff -Npur libjpeg-turbo-2.0.4/ChangeLog.md libjpeg-turbo-2.0.4-new/ChangeLog.md
  2. --- libjpeg-turbo-2.0.4/ChangeLog.md 2019-12-31 15:10:30.000000000 +0800
  3. +++ libjpeg-turbo-2.0.4-new/ChangeLog.md 2020-07-29 19:12:06.259357156 +0800
  4. @@ -562,10 +562,10 @@ application was linked against.
  5. 3. Fixed a couple of issues in the PPM reader that would cause buffer overruns
  6. in cjpeg if one of the values in a binary PPM/PGM input file exceeded the
  7. -maximum value defined in the file's header. libjpeg-turbo 1.4.2 already
  8. -included a similar fix for ASCII PPM/PGM files. Note that these issues were
  9. -not security bugs, since they were confined to the cjpeg program and did not
  10. -affect any of the libjpeg-turbo libraries.
  11. +maximum value defined in the file's header and that maximum value was greater
  12. +than 255. libjpeg-turbo 1.4.2 already included a similar fix for ASCII PPM/PGM
  13. +files. Note that these issues were not security bugs, since they were confined
  14. +to the cjpeg program and did not affect any of the libjpeg-turbo libraries.
  15. 4. Fixed an issue whereby attempting to decompress a JPEG file with a corrupt
  16. header using the `tjDecompressToYUV2()` function would cause the function to
  17. diff -Npur libjpeg-turbo-2.0.4/rdppm.c libjpeg-turbo-2.0.4-new/rdppm.c
  18. --- libjpeg-turbo-2.0.4/rdppm.c 2019-12-31 15:10:30.000000000 +0800
  19. +++ libjpeg-turbo-2.0.4-new/rdppm.c 2020-07-29 17:55:33.129123386 +0800
  20. @@ -5,7 +5,7 @@
  21. * Copyright (C) 1991-1997, Thomas G. Lane.
  22. * Modified 2009 by Bill Allombert, Guido Vollbeding.
  23. * libjpeg-turbo Modifications:
  24. - * Copyright (C) 2015-2017, D. R. Commander.
  25. + * Copyright (C) 2015-2017, 2020, D. R. Commander.
  26. * For conditions of distribution and use, see the accompanying README.ijg
  27. * file.
  28. *
  29. @@ -720,7 +720,7 @@ start_input_ppm(j_compress_ptr cinfo, cj
  30. /* On 16-bit-int machines we have to be careful of maxval = 65535 */
  31. source->rescale = (JSAMPLE *)
  32. (*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE,
  33. - (size_t)(((long)maxval + 1L) *
  34. + (size_t)(((long)MAX(maxval, 255) + 1L) *
  35. sizeof(JSAMPLE)));
  36. half_maxval = maxval / 2;
  37. for (val = 0; val <= (long)maxval; val++) {