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 eedd0c3 commit 728dc6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ChangeLog
@@ -1,8 +1,8 @@
2016-08-15 7.0.2-10 Cristy <quetzlzacatenango@image...>
* Prevent buffer overflow in BMP & SGI coders (bug report from
pwchen&rayzhong of tencent).
* 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 7.0.2-9 Cristy <quetzlzacatenango@image...>
* Release ImageMagick version 7.0.2-9, GIT revision 18707:2c02f09:20160814.
Expand Down
4 changes: 3 additions & 1 deletion coders/tiff.c
Expand Up @@ -3479,7 +3479,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 728dc6a

Please sign in to comment.