]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/657
authorCristy <urban-warrior@imagemagick.org>
Mon, 7 Aug 2017 17:21:15 +0000 (13:21 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 7 Aug 2017 17:21:15 +0000 (13:21 -0400)
coders/dds.c

index 85feee517986849769e8dd793712f2cbb26c6888..3cb3cef8797a3f30fb3b8d69fe7ee53db19278e2 100644 (file)
@@ -1783,6 +1783,8 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception)
     if (n != 0)
       {
         /* Start a new image */
+        if (EOFBlob(image) != MagickFalse)
+          ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile");
         AcquireNextImage(image_info,image,exception);
         if (GetNextImageInList(image) == (Image *) NULL)
           return(DestroyImageList(image));