From 4706bc130cd7b80edbbdec44af1ec60d1d961070 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Fri, 24 Jan 2025 00:05:53 +0100 Subject: [PATCH] No longer set TIFFTAG_STRIPBYTECOUNTS to fix the issue reported in #7917. --- coders/tiff.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/coders/tiff.c b/coders/tiff.c index 09823e3fcd..2dee6204c1 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -343,9 +343,6 @@ static Image *ReadGROUP4Image(const ImageInfo *image_info, MagickBooleanType status; - size_t - length; - TIFF *tiff; @@ -401,7 +398,7 @@ static Image *ReadGROUP4Image(const ImageInfo *image_info, } status=MagickTrue; c=ReadBlobByte(image); - for (length=0; c != EOF; length++) + while (c != EOF) { unsigned char byte = (unsigned char) c; if (TIFFWriteRawStrip(tiff,0,&byte,1) < 0) @@ -411,7 +408,6 @@ static Image *ReadGROUP4Image(const ImageInfo *image_info, } c=ReadBlobByte(image); } - TIFFSetField(tiff,TIFFTAG_STRIPBYTECOUNTS,(uint32) length); TIFFClose(tiff); (void) CloseBlob(image); image=DestroyImage(image);