]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/161
authorCristy <urban-warrior@imagemagick.org>
Mon, 4 Apr 2016 20:22:30 +0000 (16:22 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 4 Apr 2016 20:22:30 +0000 (16:22 -0400)
coders/icon.c

index 11307abe9bd18a20dd2a9fa71028135554156b73..6cb5532def8e2b5b1ec8ebeb856801b63ff81be8 100644 (file)
@@ -308,12 +308,10 @@ static Image *ReadICONImage(const ImageInfo *image_info,
     icon_file.directory[i].size=ReadBlobLSBLong(image);
     icon_file.directory[i].offset=ReadBlobLSBLong(image);
     if (EOFBlob(image) != MagickFalse)
-      {
-        ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
-          image->filename);
-        break;
-      }
+      break;
   }
+  if (EOFBlob(image) != MagickFalse)
+    ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile");
   one=1;
   for (i=0; i < icon_file.count; i++)
   {