]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/502
authorCristy <urban-warrior@imagemagick.org>
Wed, 31 May 2017 10:23:27 +0000 (06:23 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 31 May 2017 10:23:27 +0000 (06:23 -0400)
coders/rle.c
configure

index e2d68ead36bb7dbe4cc5fb90330355b0f7b31bda..9a31baa54339a7b5e17f80f4a6ef9fbdc7416a83 100644 (file)
@@ -375,14 +375,14 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
         case SkipLinesOp:
         {
           operand=ReadBlobByte(image);
-          if (opcode == EOF)
+          if (operand == EOF)
             ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
           if (opcode & 0x40)
             {
               operand=ReadBlobLSBSignedShort(image);
-              if (opcode == EOF)
+              if (operand == EOF)
                 ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
-           }
+            }
           x=0;
           y+=operand;
           break;
@@ -390,7 +390,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
         case SetColorOp:
         {
           operand=ReadBlobByte(image);
-          if (opcode == EOF)
+          if (operand == EOF)
             ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
           plane=(unsigned char) operand;
           if (plane == 255)
@@ -401,12 +401,12 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
         case SkipPixelsOp:
         {
           operand=ReadBlobByte(image);
-          if (opcode == EOF)
+          if (operand == EOF)
             ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
           if (opcode & 0x40)
             {
               operand=ReadBlobLSBSignedShort(image);
-              if (opcode == EOF)
+              if (operand == EOF)
                 ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
             }
           x+=operand;
@@ -415,12 +415,12 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
         case ByteDataOp:
         {
           operand=ReadBlobByte(image);
-          if (opcode == EOF)
+          if (operand == EOF)
             ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
           if (opcode & 0x40)
             {
               operand=ReadBlobLSBSignedShort(image);
-              if (opcode == EOF)
+              if (operand == EOF)
                 ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
             }
           offset=(ssize_t) (((image->rows-y-1)*image->columns*number_planes)+x*
@@ -451,12 +451,12 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
         case RunDataOp:
         {
           operand=ReadBlobByte(image);
-          if (opcode == EOF)
+          if (operand == EOF)
             ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
           if (opcode & 0x40)
             {
               operand=ReadBlobLSBSignedShort(image);
-              if (opcode == EOF)
+              if (operand == EOF)
                 ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
             }
           pixel=(unsigned char) ReadBlobByte(image);
index 34ab0164b218b51fb29e913f2b1a528d17143c85..48dc65606ecc4f05b66336e20a47c9792ef61437 100755 (executable)
--- a/configure
+++ b/configure
@@ -4519,7 +4519,7 @@ MAGICK_PATCHLEVEL_VERSION=10
 
 MAGICK_VERSION=7.0.5-10
 
-MAGICK_GIT_REVISION=20114:02a83ef:20170528
+MAGICK_GIT_REVISION=20128:13b8ea1:20170531
 
 
 # Substitute library versioning