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

45 lines
1.7 KiB

  1. commit 4307dad7fc153baefeb6bb677060e9c5157e5d42
  2. Author: erouault <erouault>
  3. Date: Sat Dec 3 11:35:56 2016 +0000
  4. * tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so
  5. that the output buffer is correctly incremented to avoid write outside bounds.
  6. Reported by Agostino Sarubbo.
  7. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620
  8. diff --git a/ChangeLog b/ChangeLog
  9. index 5b23665..d6a416b 100644
  10. --- a/ChangeLog
  11. +++ b/ChangeLog
  12. @@ -1,5 +1,12 @@
  13. 2016-12-03 Even Rouault <even.rouault at spatialys.com>
  14. + * tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so
  15. + that the output buffer is correctly incremented to avoid write outside bounds.
  16. + Reported by Agostino Sarubbo.
  17. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620
  18. +
  19. +2016-12-03 Even Rouault <even.rouault at spatialys.com>
  20. +
  21. * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in
  22. OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues.
  23. Reported by Agostino Sarubbo.
  24. diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
  25. index 722b132..bdcbd63 100644
  26. --- a/tools/tiffcrop.c
  27. +++ b/tools/tiffcrop.c
  28. @@ -1,4 +1,4 @@
  29. -/* $Id: tiffcrop.c,v 1.46 2016-11-18 14:58:46 erouault Exp $ */
  30. +/* $Id: tiffcrop.c,v 1.47 2016-12-03 11:35:56 erouault Exp $ */
  31. /* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of
  32. * the image data through additional options listed below
  33. @@ -3698,7 +3698,7 @@ static int readContigStripsIntoBuffer (TIFF* in, uint8* buf)
  34. (unsigned long) strip, (unsigned long)rows);
  35. return 0;
  36. }
  37. - bufp += bytes_read;
  38. + bufp += stripsize;
  39. }
  40. return 1;