Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix TIFF divide by zero (bug report from Donghai Zhu)
  • Loading branch information
Cristy committed Aug 24, 2016
1 parent 10b3823 commit f983dcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ChangeLog
Expand Up @@ -3,8 +3,8 @@
pwchen&rayzhong of tencent).
* Fix MSVG regression (reference
https://github.com/ImageMagick/ImageMagick/issues/252).
* Prevent buffer overflow in SIXEL, PDB, MAP, and CALS coders (bug report
from Donghai Zhu).
* Prevent buffer overflow and other problems in SIXEL, PDB, MAP, TIFF, and
CALS coders (bug report from Donghai Zhu).

2016-08-14 6.9.5-7 Cristy <quetzlzacatenango@image...>
* Release ImageMagick version 6.9.5-7, GIT revision 10993:7d2fd25:20160814.
Expand Down
4 changes: 3 additions & 1 deletion coders/tiff.c
Expand Up @@ -3469,7 +3469,9 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info,
if ((image_info->interlace == PlaneInterlace) ||
(image_info->interlace == PartitionInterlace))
(void) TIFFSetField(tiff,TIFFTAG_PLANARCONFIG,PLANARCONFIG_SEPARATE);
rows_per_strip=TIFFDefaultStripSize(tiff,0);
rows_per_strip=1;
if (TIFFScanlineSize(tiff) != 0)
rows_per_strip=TIFFDefaultStripSize(tiff,0);
option=GetImageOption(image_info,"tiff:rows-per-strip");
if (option != (const char *) NULL)
rows_per_strip=(size_t) strtol(option,(char **) NULL,10);
Expand Down

0 comments on commit f983dcd

Please sign in to comment.