From: cristy Date: Sun, 11 Jan 2015 19:17:25 +0000 (+0000) Subject: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26861 X-Git-Tag: 7.0.1-0~1454 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc2a4d2ba5371d25c58763e4db2dbc1f4691c0f7;p=imagemagick http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26861 --- diff --git a/coders/dds.c b/coders/dds.c index f9a3ed128..47962cdd2 100644 --- a/coders/dds.c +++ b/coders/dds.c @@ -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); }