From cc2a4d2ba5371d25c58763e4db2dbc1f4691c0f7 Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 11 Jan 2015 19:17:25 +0000 Subject: [PATCH] http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26861 --- coders/dds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } -- 2.40.0