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.5 KiB

  1. commit a1d523c27dafafadf589c77e834c52661f1c78fc
  2. Author: erouault <erouault>
  3. Date: Sat Dec 3 14:18:48 2016 +0000
  4. * tools/tiffinfo.c: fix null pointer dereference in -r mode when the image has
  5. no StripByteCount tag.
  6. Reported by Agostino Sarubbo.
  7. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2594
  8. diff --git a/ChangeLog b/ChangeLog
  9. index dd27c7f..e41d00c 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/tiffinfo.c: fix null pointer dereference in -r mode when the image has
  15. + no StripByteCount tag.
  16. + Reported by Agostino Sarubbo.
  17. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2594
  18. +
  19. +2016-12-03 Even Rouault <even.rouault at spatialys.com>
  20. +
  21. * tools/tiffcrop.c: fix integer division by zero when BitsPerSample is missing.
  22. Reported by Agostino Sarubbo.
  23. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2619
  24. diff --git a/tools/tiffinfo.c b/tools/tiffinfo.c
  25. index b02c7d4..4d58055 100644
  26. --- a/tools/tiffinfo.c
  27. +++ b/tools/tiffinfo.c
  28. @@ -1,4 +1,4 @@
  29. -/* $Id: tiffinfo.c,v 1.25 2016-11-12 20:06:05 bfriesen Exp $ */
  30. +/* $Id: tiffinfo.c,v 1.26 2016-12-03 14:18:49 erouault Exp $ */
  31. /*
  32. * Copyright (c) 1988-1997 Sam Leffler
  33. @@ -417,7 +417,7 @@ TIFFReadRawData(TIFF* tif, int bitrev)
  34. uint64* stripbc=NULL;
  35. TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbc);
  36. - if (nstrips > 0) {
  37. + if (stripbc != NULL && nstrips > 0) {
  38. uint32 bufsize = (uint32) stripbc[0];
  39. tdata_t buf = _TIFFmalloc(bufsize);
  40. tstrip_t s;