]> granicus.if.org Git - imagemagick/commitdiff
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26861
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 11 Jan 2015 19:17:25 +0000 (19:17 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 11 Jan 2015 19:17:25 +0000 (19:17 +0000)
coders/dds.c

index f9a3ed1286b8e1680fe91074f9a885dedf04e2b6..47962cdd23a05a9da7181969eb56581439cfa66a 100644 (file)
@@ -2384,8 +2384,8 @@ static MagickBooleanType SkipDXTMipmaps(Image *image,DDSInfo *dds_info,
       for (i = 1; (i < (ssize_t) dds_info->mipmapcount) && w && h; i++)
       {
         offset = (MagickOffsetType) ((w + 3) / 4) * ((h + 3) / 4) * texel_size;
-        (void) SeekBlob(image, offset, SEEK_CUR);
-        
+        if (SeekBlob(image, offset, SEEK_CUR) < 0)
+          break;
         w = DIV2(w);
         h = DIV2(h);
       }
@@ -2431,8 +2431,8 @@ static MagickBooleanType SkipRGBMipmaps(Image *image,DDSInfo *dds_info,
       for (i=1; (i < (ssize_t) dds_info->mipmapcount) && w && h; i++)
       {
         offset = (MagickOffsetType) w * h * pixel_size;
-        (void) SeekBlob(image, offset, SEEK_CUR);
-        
+        if (SeekBlob(image, offset, SEEK_CUR) < 0)
+          break;
         w = DIV2(w);
         h = DIV2(h);
       }