[poppler] Branch 'xpdf303merge' - poppler/Parser.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Aug 31 12:07:01 PDT 2011


 poppler/Parser.cc |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 4cef5a52b33b1afba28d890bbe48000b734ac357
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Aug 31 21:09:50 2011 +0200

    xpdf303: Protect against NULL from lexer->getStream()

diff --git a/poppler/Parser.cc b/poppler/Parser.cc
index fc935d2..790ec3c 100644
--- a/poppler/Parser.cc
+++ b/poppler/Parser.cc
@@ -182,7 +182,10 @@ Stream *Parser::makeStream(Object *dict, Guchar *fileKey,
 
   // get stream start position
   lexer->skipToNextLine();
-  pos = lexer->getPos();
+  if (!(str = lexer->getStream())) {
+    return NULL;
+  }
+  pos = str->getPos();
 
   // get length
   dict->dictLookup("Length", &obj, fetchOriginatorNums);


More information about the poppler mailing list