From: Cristy Date: Tue, 30 Jan 2018 16:43:03 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5601 X-Git-Tag: 7.0.7-23~210 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eff2738417795259103f023eb7b5905fd46d69f0;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5601 --- diff --git a/coders/rle.c b/coders/rle.c index a127d216d..1a2e02a63 100644 --- a/coders/rle.c +++ b/coders/rle.c @@ -374,7 +374,11 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception) y=0; opcode=ReadBlobByte(image); if (opcode == EOF) - ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile"); + { + if (number_colormaps != 0) + colormap=(unsigned char *) RelinquishMagickMemory(colormap); + ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile"); + } do { switch (opcode & 0x3f)