Skip to content

Commit 16916c8

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/1269
1 parent 5a295f0 commit 16916c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: coders/dcm.c

+2
Original file line numberDiff line numberDiff line change
@@ -3853,6 +3853,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
38533853
tag=((unsigned int) ReadBlobLSBShort(image) << 16) |
38543854
ReadBlobLSBShort(image);
38553855
length=(size_t) ReadBlobLSBLong(image);
3856+
if (length > (size_t) GetBlobSize(image))
3857+
ThrowDCMException(CorruptImageError,"InsufficientImageDataInFile");
38563858
if (tag == 0xFFFEE0DD)
38573859
break; /* sequence delimiter tag */
38583860
if (tag != 0xFFFEE000)

0 commit comments

Comments
 (0)