From 86cb33143c5b21912187403860a7c26761a3cd23 Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 31 May 2017 06:23:27 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/502 --- coders/rle.c | 20 ++++++++++---------- configure | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/coders/rle.c b/coders/rle.c index e2d68ead3..9a31baa54 100644 --- a/coders/rle.c +++ b/coders/rle.c @@ -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); diff --git a/configure b/configure index 34ab0164b..48dc65606 100755 --- 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 -- 2.40.0