[prev in list] [next in list] [prev in thread] [next in thread]
List: graphicsmagick-commit
Subject: [GM-commit] GraphicsMagick: PALM: Fix possible use of null pointer upon allo...
From: GraphicsMagick Commits <graphicsmagick-commit () lists ! sourceforge ! net>
Date: 2017-09-30 20:16:24
Message-ID: mailman.1877.1506802592.12767.graphicsmagick-commit () lists ! sourceforge ! net
[Download RAW message or body]
changeset b0b6aba92ed1 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=b0b6aba92ed1
summary: PALM: Fix possible use of null pointer upon alloc failure.
diffstat:
ChangeLog | 3 +++
coders/palm.c | 10 ++++++++--
www/Changelog.html | 2 ++
3 files changed, 13 insertions(+), 2 deletions(-)
diffs (47 lines):
diff -r 472bf9f2771f -r b0b6aba92ed1 ChangeLog
--- a/ChangeLog Sat Sep 30 15:08:46 2017 -0500
+++ b/ChangeLog Sat Sep 30 15:16:22 2017 -0500
@@ -1,5 +1,8 @@
2017-09-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/palm.c (ReadPALMImage): Fix SourceForge issue #487 "NULL
+ pointer dereference in ReadPALMImage".
+
* Magick++/lib/Options.cpp (strokeDashArray): Fix SourceForge
issue #486 "NULL pointer dereference in
Magick::Options::strokeDashArray".
diff -r 472bf9f2771f -r b0b6aba92ed1 coders/palm.c
--- a/coders/palm.c Sat Sep 30 15:08:46 2017 -0500
+++ b/coders/palm.c Sat Sep 30 15:16:22 2017 -0500
@@ -1149,11 +1149,17 @@
if (CheckImagePixelLimits(image, exception) != MagickPass)
ThrowPALMReaderException(ResourceLimitError,ImagePixelLimitExceeded,image);
- one_row = MagickAllocateMemory(unsigned char \
*,Max(palm_header.bytes_per_row,2*image->columns)); + one_row = \
MagickAllocateMemory(unsigned char *,Max(palm_header.bytes_per_row, + \
MagickArraySize(2,image->columns))); if (one_row == (unsigned char *) NULL)
ThrowPALMReaderException(ResourceLimitError,MemoryAllocationFailed,image);
if (palm_header.compression_type == PALM_COMPRESSION_SCANLINE)
- lastrow = MagickAllocateMemory(unsigned char \
*,Max(palm_header.bytes_per_row,2*image->columns)); + {
+ lastrow = MagickAllocateMemory(unsigned char *,Max(palm_header.bytes_per_row,
+ \
MagickArraySize(2,image->columns))); + if (lastrow == (unsigned char *) NULL)
+ ThrowPALMReaderException(ResourceLimitError,MemoryAllocationFailed,image);
+ }
mask = (1l << palm_header.bits_per_pixel) - 1;
diff -r 472bf9f2771f -r b0b6aba92ed1 www/Changelog.html
--- a/www/Changelog.html Sat Sep 30 15:08:46 2017 -0500
+++ b/www/Changelog.html Sat Sep 30 15:16:22 2017 -0500
@@ -38,6 +38,8 @@
<p>2017-09-30 Bob Friesenhahn <<a class="reference external" \
href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span> \
4;</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p>
<blockquote>
<ul class="simple">
+<li>coders/palm.c (ReadPALMImage): Fix SourceForge issue #487 "NULL
+pointer dereference in ReadPALMImage".</li>
<li>Magick++/lib/Options.cpp (strokeDashArray): Fix SourceForge
issue #486 "NULL pointer dereference in
Magick::Options::strokeDashArray".</li>
------------------------------------------------------------------------------
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