From a7bb158b7bedd1449a34432feb3a67c8f1873bfa Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 30 Sep 2016 15:19:06 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/280 --- MagickCore/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MagickCore/profile.c b/MagickCore/profile.c index ea7605770..4239d558c 100644 --- a/MagickCore/profile.c +++ b/MagickCore/profile.c @@ -2032,7 +2032,7 @@ MagickBooleanType SyncExifProfile(Image *image,StringInfo *profile) break; /* corrupt EXIF */ tag_value=(ssize_t) ReadProfileShort(endian,q); format=(ssize_t) ReadProfileShort(endian,q+2); - if ((format-1) >= EXIF_NUM_FORMATS) + if ((format < 0) || ((format-1) >= EXIF_NUM_FORMATS)) break; components=(ssize_t) ReadProfileLong(endian,q+4); if (components < 0) -- 2.50.1