]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5601
authorCristy <urban-warrior@imagemagick.org>
Tue, 30 Jan 2018 16:43:03 +0000 (11:43 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 30 Jan 2018 16:44:15 +0000 (11:44 -0500)
coders/rle.c

index a127d216db8352555efc9bacefc2e60bf2acb4ec..1a2e02a63d4c16aadf2af3fd645e6c1020a4254c 100644 (file)
@@ -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)