Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/196
  • Loading branch information
Cristy committed Jun 4, 2016
1 parent 933e96f commit 4e914bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion coders/tiff.c
Expand Up @@ -390,8 +390,10 @@ static Image *ReadGROUP4Image(const ImageInfo *image_info,
length=fwrite("\000\000\000\000",1,4,file);
length=WriteLSBLong(file,(long) image->resolution.x);
length=WriteLSBLong(file,1);
status=MagickTrue;
for (length=0; (c=ReadBlobByte(image)) != EOF; length++)
(void) fputc(c,file);
if (fputc(c,file) != c)
status=MagickFalse;
offset=(ssize_t) fseek(file,(ssize_t) offset,SEEK_SET);
length=WriteLSBLong(file,(unsigned int) length);
(void) fclose(file);
Expand All @@ -413,6 +415,8 @@ static Image *ReadGROUP4Image(const ImageInfo *image_info,
(void) CopyMagickString(image->magick,"GROUP4",MagickPathExtent);
}
(void) RelinquishUniqueFileResource(filename);
if (status == MagickFalse)
image=DestroyImage(image);
return(image);
}
#endif
Expand Down

0 comments on commit 4e914bb

Please sign in to comment.