summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Bader <williambader@hotmail.com>2012-09-09 21:31:58 +0200
committerAlbert Astals Cid <aacid@kde.org>2012-09-09 21:31:58 +0200
commitad7c6ac88f2315c9ce003308d1b4988592d4434b (patch)
treeee34017697338fa2a9c9a6584b7336897b8cfa52
parentb861af714daee4125e54b250dddf82106f5a8ce8 (diff)
Fix crash in 1028.pdf.SIGSEGV.ae6.33
-rw-r--r--poppler/JBIG2Stream.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index a8486a3e..587ef385 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -18,6 +18,7 @@
// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 David Benjamin <davidben@mit.edu>
// Copyright (C) 2011 Edward Jiang <ejiang@google.com>
+// Copyright (C) 2012 William Bader <williambader@hotmail.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -719,6 +720,13 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, int wA, int hA):
JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap):
JBIG2Segment(segNumA)
{
+ if (!bitmap) {
+ error(errSyntaxError, -1, "NULL bitmap in JBIG2Bitmap");
+ w = h = line = 0;
+ data = NULL;
+ return;
+ }
+
w = bitmap->w;
h = bitmap->h;
line = bitmap->line;