]> granicus.if.org Git - imagemagick/commitdiff
Eliminate out-of-memory in TGA format
authorCristy <urban-warrior@imagemagick.org>
Tue, 23 Jan 2018 14:21:05 +0000 (09:21 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 23 Jan 2018 14:21:05 +0000 (09:21 -0500)
Credit OSS Fuzz

ChangeLog
coders/tga.c

index f6914602cc3888018ef7a8b6572789957d7888ac..7957046b7170e668b8d8d29fb3df2715d379fb2d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,5 @@
 2018-01-23  7.0.7-23 Cristy  <quetzlzacatenango@image...>
-  * Fixed numerous memory leaks, credit to OSS Fuzz.
+  * Fixed numerous use of uninitialized value, credit to OSS Fuzz.
 
 2018-01-22  7.0.7-22 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.0-22, GIT revision 22391:e8be814f1:20180122.
index 325f4205be178ec22750d46c5016dd2b6edd86d1..259677c91ca65c6d6fc64fdc1fa3b00b42d179a5 100644 (file)
@@ -271,7 +271,7 @@ static Image *ReadTGAImage(const ImageInfo *image_info,
 
           one=1;
           image->colors=one << tga_info.bits_per_pixel;
-          if (image->colors > ((~0UL)/sizeof(*image->colormap)))
+          if (image->colors > ((~0U)/sizeof(*image->colormap)))
             ThrowReaderException(CorruptImageError,"ImproperImageHeader");
           if (AcquireImageColormap(image,image->colors,exception) == MagickFalse)
             ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");