Skip to content

Commit a7bb158

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/280
1 parent 3c57527 commit a7bb158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: MagickCore/profile.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2032,7 +2032,7 @@ MagickBooleanType SyncExifProfile(Image *image,StringInfo *profile)
20322032
break; /* corrupt EXIF */
20332033
tag_value=(ssize_t) ReadProfileShort(endian,q);
20342034
format=(ssize_t) ReadProfileShort(endian,q+2);
2035-
if ((format-1) >= EXIF_NUM_FORMATS)
2035+
if ((format < 0) || ((format-1) >= EXIF_NUM_FORMATS))
20362036
break;
20372037
components=(ssize_t) ReadProfileLong(endian,q+4);
20382038
if (components < 0)

0 commit comments

Comments
 (0)