[poppler] poppler/Parser.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Nov 3 11:22:20 UTC 2018


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

New commits:
commit 08572e1bdca03baed694dd9828bb2b878865e669
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sat Nov 3 12:21:41 2018 +0100

    Parser::makeStream: Fix crash on malformed files
    
    fixes oss-fuzz/11244

diff --git a/poppler/Parser.cc b/poppler/Parser.cc
index 87745414..2cf2bd12 100644
--- a/poppler/Parser.cc
+++ b/poppler/Parser.cc
@@ -230,6 +230,10 @@ Stream *Parser::makeStream(Object &&dict, Guchar *fileKey,
     length = 0;
   }
 
+  // the above dictLookup can cause a xref reconstruction if the file is damaged
+  // so we need to update the entry pointer
+  entry = xref ? xref->getEntry(objNum, false) : nullptr;
+
   // check for length in damaged file
   if (xref && xref->getStreamEnd(pos, &endPos)) {
     length = endPos - pos;


More information about the poppler mailing list