Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/502
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed May 31, 2017
1 parent 13b8ea1 commit 86cb331
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions coders/rle.c
Expand Up @@ -375,22 +375,22 @@ 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;
}
case SetColorOp:
{
operand=ReadBlobByte(image);
if (opcode == EOF)
if (operand == EOF)
ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
plane=(unsigned char) operand;
if (plane == 255)
Expand All @@ -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;
Expand All @@ -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*
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -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
Expand Down

0 comments on commit 86cb331

Please sign in to comment.