From cd20c1573153d97277d36e1ed6251125ff63d391 Mon Sep 17 00:00:00 2001 From: cristy Date: Mon, 9 Apr 2012 18:57:54 +0000 Subject: [PATCH] --- coders/bmp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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); -- 2.40.0