[prev in list] [next in list] [prev in thread] [next in thread] 

List:       graphicsmagick-commit
Subject:    [GM-commit] GraphicsMagick: PCX: Fix memory leak in error path in writer
From:       GraphicsMagick Commits <graphicsmagick-commit () lists ! sourceforge ! net>
Date:       2017-09-30 21:57:11
Message-ID: mailman.1943.1506808640.12767.graphicsmagick-commit () lists ! sourceforge ! net
[Download RAW message or body]

changeset 0a70ee58f401 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=0a70ee58f401
                
summary: PCX: Fix memory leak in error path in writer

diffstat:

 ChangeLog          |   3 +++
 coders/pcx.c       |  12 ++++++------
 www/Changelog.html |   2 ++
 3 files changed, 11 insertions(+), 6 deletions(-)

diffs (63 lines):

diff -r 755359b1a5ac -r 0a70ee58f401 ChangeLog
--- a/ChangeLog	Sat Sep 30 16:53:07 2017 -0500
+++ b/ChangeLog	Sat Sep 30 16:57:09 2017 -0500
@@ -1,5 +1,8 @@
 2017-09-30  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
 
+	* coders/pcx.c (ReadPCXImage): Fix SourceForge issue #494 "memory
+	leak in pcx.c".
+
 	* coders/pcd.c (ReadPCDImage): Fix SourceForge issue #493 "memory
 	leak in ReadPCDImage".
 
diff -r 755359b1a5ac -r 0a70ee58f401 coders/pcx.c
--- a/coders/pcx.c	Sat Sep 30 16:53:07 2017 -0500
+++ b/coders/pcx.c	Sat Sep 30 16:57:09 2017 -0500
@@ -1,5 +1,5 @@
 /*
-% Copyright (C) 2003 - 2016 GraphicsMagick Group
+% Copyright (C) 2003 - 2017 GraphicsMagick Group
 % Copyright (C) 2002 ImageMagick Studio
 % Copyright 1991-1999 E. I. du Pont de Nemours and Company
 %
@@ -457,7 +457,7 @@
         break;
 
     if (CheckImagePixelLimits(image, exception) != MagickPass)
-      ThrowReaderException(ResourceLimitError,ImagePixelLimitExceeded,image);
+      ThrowPCXReaderException(ResourceLimitError,ImagePixelLimitExceeded,image);
 
 
     /*
@@ -474,15 +474,15 @@
         {
           /* Not compressed */
           if (uncompressed_size > file_size)
-            ThrowReaderException(CorruptImageError,InsufficientImageDataInFile,
-                                   image);
+            ThrowPCXReaderException(CorruptImageError,InsufficientImageDataInFile,
+                                    image);
         }
       else
         {
           /* RLE compressed */
           if (uncompressed_size > file_size*254.0)
-            ThrowReaderException(CorruptImageError,InsufficientImageDataInFile,
-                                 image);
+            ThrowPCXReaderException(CorruptImageError,InsufficientImageDataInFile,
+                                    image);
         }
     }
 
diff -r 755359b1a5ac -r 0a70ee58f401 www/Changelog.html
--- a/www/Changelog.html	Sat Sep 30 16:53:07 2017 -0500
+++ b/www/Changelog.html	Sat Sep 30 16:57:09 2017 -0500
@@ -38,6 +38,8 @@
 <p>2017-09-30  Bob Friesenhahn  &lt;<a class="reference external" \
href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#6 \
4;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
  <blockquote>
 <ul class="simple">
+<li>coders/pcx.c (ReadPCXImage): Fix SourceForge issue #494 &quot;memory
+leak in pcx.c&quot;.</li>
 <li>coders/pcd.c (ReadPCDImage): Fix SourceForge issue #493 &quot;memory
 leak in ReadPCDImage&quot;.</li>
 <li>coders/histogram.c (WriteHISTOGRAMImage): Fix SourceForge issue

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Graphicsmagick-commit mailing list
Graphicsmagick-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-commit


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic