]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 9 Apr 2012 18:57:54 +0000 (18:57 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 9 Apr 2012 18:57:54 +0000 (18:57 +0000)
coders/bmp.c

index f1057a53b3d739b4a6ad262b4d5ccc65f5740734..9bf12b64579b093183452fe2e47fb540382aa982 100644 (file)
@@ -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);