]> granicus.if.org Git - imagemagick/commitdiff
Lowered max map_length to prevent an overflow (#271).
authorDirk Lemstra <dirk@git.imagemagick.org>
Mon, 21 Nov 2016 19:53:03 +0000 (20:53 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Mon, 21 Nov 2016 19:53:03 +0000 (20:53 +0100)
coders/rle.c

index 05a65ec226e351eb03ceba648866b05b089dc97c..49638a4b8c933943c72b566732cca897ec0c63be 100644 (file)
@@ -224,7 +224,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
     bits_per_pixel=(size_t) ReadBlobByte(image);
     number_colormaps=(size_t) ReadBlobByte(image);
     map_length=(unsigned char) ReadBlobByte(image);
-    if (map_length >= 32)
+    if (map_length >= 22)
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     one=1;
     map_length=one << map_length;