Commit 4decb2103 for imagemagick.org
commit 4decb210339ac404084e3189191efcde5986e989
Author: Dirk Lemstra <dirk@lemstra.org>
Date: Sat Oct 24 12:12:17 2026 +0200
Minor optimization.
diff --git a/coders/gif.c b/coders/gif.c
index fe0a81099..fe41b6a3a 100644
--- a/coders/gif.c
+++ b/coders/gif.c
@@ -888,6 +888,8 @@ static ssize_t ReadBlobBlock(Image *image,unsigned char *data)
count=ReadBlob(image,1,&block_count);
if (count != 1)
return(0);
+ if (block_count == 0)
+ return(0);
count=ReadBlob(image,(size_t) block_count,data);
if (count != (ssize_t) block_count)
return(0);