]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 24 May 2014 23:26:25 +0000 (23:26 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 24 May 2014 23:26:25 +0000 (23:26 +0000)
coders/rle.c

index a1fb820694bd030bd7880a16529c745b07d72a29..24b44f00eab21c731d572abff5442c5c64b11956 100644 (file)
@@ -219,8 +219,11 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
     number_planes=1UL*ReadBlobByte(image);
     bits_per_pixel=1UL*ReadBlobByte(image);
     number_colormaps=1UL*ReadBlobByte(image);
+    map_length=(unsigned char) ReadBlobByte(image);
+    if (map_length >= 64)
+      ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     one=1;
-    map_length=one << (unsigned char) ReadBlobByte(image);
+    map_length=one << map_length;
     if ((number_planes == 0) || (number_planes == 2) || (bits_per_pixel != 8) ||
         (image->columns == 0))
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");