From: cristy Date: Mon, 9 Apr 2012 18:57:54 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5854 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd20c1573153d97277d36e1ed6251125ff63d391;p=imagemagick --- diff --git a/coders/bmp.c b/coders/bmp.c index f1057a53b..9bf12b645 100644 --- a/coders/bmp.c +++ b/coders/bmp.c @@ -903,12 +903,9 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Read image data. */ - if ((start_position+bmp_info.offset_bits) > TellBlob(image)) - { - offset=SeekBlob(image,start_position+bmp_info.offset_bits,SEEK_SET); - if (offset < 0) - ThrowReaderException(CorruptImageError,"ImproperImageHeader"); - } + offset=SeekBlob(image,start_position+bmp_info.offset_bits,SEEK_SET); + if (offset < 0) + ThrowReaderException(CorruptImageError,"ImproperImageHeader"); if (bmp_info.compression == BI_RLE4) bmp_info.bits_per_pixel<<=1; bytes_per_line=4*((image->columns*bmp_info.bits_per_pixel+31)/32);