Skip to content

Commit 7d63315

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/654
1 parent f1ea048 commit 7d63315

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: coders/wpg.c

+2
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,8 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
10351035
if(i==EOF)
10361036
break;
10371037
Rd_WP_DWORD(image,&Rec.RecordLength);
1038+
if (Rec.RecordLength > GetBlobSize(image))
1039+
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
10381040
if(EOFBlob(image))
10391041
break;
10401042

0 commit comments

Comments
 (0)