]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 10 Oct 2009 14:14:40 +0000 (14:14 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 10 Oct 2009 14:14:40 +0000 (14:14 +0000)
coders/dcm.c

index 43d54e1f44d6485f3873acc6e0a0aad2abd82f55..ef8d9fed27e40311e2d6a32aff84c03ac5e41bcf 100644 (file)
@@ -3775,6 +3775,12 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
             }
         }
       }
+    if (EOFBlob(image) != MagickFalse)
+      {
+        ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
+          image->filename);
+        break;
+      }
     /*
       Proceed to next image.
     */
@@ -3798,12 +3804,6 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         if (status == MagickFalse)
           break;
       }
-    if (EOFBlob(image) != MagickFalse)
-      {
-        ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
-          image->filename);
-        break;
-      }
   }
   /*
     Free resources.