WPG: Fix crash which image fails to produce expected PseudoClass indexes.
--- a/ChangeLog Sun Sep 10 10:35:23 2017 -0500
+++ b/ChangeLog Sun Sep 10 14:39:04 2017 -0500
@@ -1,5 +1,9 @@
2017-09-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * coders/wpg.c (InsertRow): Fix crash which occurs if image is not
+ PseudoClass but a PseudoColor scanline is needed. Resolves
+ SourceForge issue #449 "Null pointer dereference in InsertRow()".
+
* coders/rle.c (ReadRLEImage): Impose image dimension limits
according to Utah RLE specification. Cap number of planes handled
internally at 4. Remove non-standard multi-frame extension, which
--- a/coders/wpg.c Sun Sep 10 10:35:23 2017 -0500
+++ b/coders/wpg.c Sun Sep 10 14:39:04 2017 -0500
@@ -280,6 +280,9 @@
case 2: /* Convert PseudoColor scanline. */
{
indexes=AccessMutableIndexes(image);
+ if ((image->storage_class != PseudoClass) ||
+ (indexes == (IndexPacket *) NULL))
+ return MagickFail;
x = 0;
while(x < (long)image->columns-3)
{
--- a/www/Changelog.html Sun Sep 10 10:35:23 2017 -0500
+++ b/www/Changelog.html Sun Sep 10 14:39:04 2017 -0500
@@ -38,6 +38,9 @@
<p>2017-09-10 Bob Friesenhahn <<a class="reference external" href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span>@</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p>
<blockquote>
<ul class="simple">
+<li>coders/wpg.c (InsertRow): Fix crash which occurs if image is not
+PseudoClass but a PseudoColor scanline is needed. Resolves
+SourceForge issue #449 "Null pointer dereference in InsertRow()".</li>
<li>coders/rle.c (ReadRLEImage): Impose image dimension limits
according to Utah RLE specification. Cap number of planes handled
internally at 4. Remove non-standard multi-frame extension, which