Skip to content

Commit 9a069e0

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/354
1 parent ac36bf9 commit 9a069e0

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
@@ -2043,7 +2043,7 @@ MagickBooleanType SyncExifProfile(Image *image,StringInfo *profile)
20432043
The directory entry contains an offset.
20442044
*/
20452045
offset=(ssize_t) ReadProfileLong(endian,q+8);
2046-
if ((size_t) (offset+number_bytes) > length)
2046+
if ((offset < 0) || ((size_t) (offset+number_bytes) > length))
20472047
continue;
20482048
if (~length < number_bytes)
20492049
continue; /* prevent overflow */

0 commit comments

Comments
 (0)