Commit 880057ce3 for imagemagick.org
commit 880057ce34f6da9dff2fe3b290bbbc45b743e613
Author: Dirk Lemstra <dirk@lemstra.org>
Date: Thu Feb 12 07:49:05 2026 +0100
Fixed possible infinite loop (GHSA-v994-63cg-9wj3)
diff --git a/coders/meta.c b/coders/meta.c
index e6a10c207..d8a84d20b 100644
--- a/coders/meta.c
+++ b/coders/meta.c
@@ -1902,7 +1902,7 @@ static void formatIPTC(Image *ifile, Image *ofile)
foundiptc = 0; /* found the IPTC-Header */
- c = ReadBlobByte(ifile);
+ c=ReadBlobByte(ifile);
while (c != EOF)
{
if (c == 0x1c)
@@ -1913,17 +1913,17 @@ static void formatIPTC(Image *ifile, Image *ofile)
return;
else
{
- c=0;
+ c=ReadBlobByte(ifile);
continue;
}
}
/* we found the 0x1c tag and now grab the dataset and record number tags */
- c = ReadBlobByte(ifile);
+ c=ReadBlobByte(ifile);
if (c == EOF)
return;
dataset = (unsigned char) c;
- c = ReadBlobByte(ifile);
+ c=ReadBlobByte(ifile);
if (c == EOF)
return;
recnum = (unsigned char) c;