We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3af9a95 commit 7779f1fCopy full SHA for 7779f1f
coders/tim.c
@@ -234,7 +234,10 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception)
234
(void) ReadBlobLSBShort(image);
235
width=ReadBlobLSBShort(image);
236
height=ReadBlobLSBShort(image);
237
- image_size=2*width*height;
+ if (HeapOverflowSanityCheckGetSize(2*width,height,&image_size) != MagickFalse)
238
+ ThrowReaderException(CorruptImageError,"ImproperImageHeader");
239
+ if (image_size > GetBlobSize(image))
240
+ ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
241
bytes_per_line=width*2;
242
width=(width*16)/bits_per_pixel;
243
image->columns=width;
0 commit comments