]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 14 Aug 2012 12:43:27 +0000 (12:43 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 14 Aug 2012 12:43:27 +0000 (12:43 +0000)
coders/jnx.c

index 677640ca9bb342dc87c03a09e2905df7eafc0d37..d2d498c067ff07ab1c269b97dc3d27e44b947b3a 100644 (file)
@@ -223,10 +223,15 @@ static Image *ReadJNXImage(const ImageInfo *image_info,ExceptionInfo *exception)
   images=NewImageList();
   for (i=0; i < (ssize_t) jnx_info.levels; i++)
   {
+    MagickOffsetType
+      offset;
+
     register ssize_t
       j;
 
-    (void) SeekBlob(image,(MagickOffsetType) jnx_level_info[i].offset,SEEK_SET);
+    offset=SeekBlob(image,(MagickOffsetType) jnx_level_info[i].offset,SEEK_SET);
+    if (offset != (MagickOffsetType) jnx_level_info[i].offset)
+      continue;
     for (j=0; j < (ssize_t) jnx_level_info[i].count; j++)
     {
       Image
@@ -238,9 +243,6 @@ static Image *ReadJNXImage(const ImageInfo *image_info,ExceptionInfo *exception)
       int
         tile_offset;
 
-      MagickOffsetType
-        offset;
-
       PointInfo
         northeast,
         southwest;