[poppler] poppler/Parser.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Tue May 22 19:42:29 UTC 2018


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

New commits:
commit 942a426f2844b66758b6b443234c3686d61420cc
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue May 22 21:41:51 2018 +0200

    Parser::makeStream: Make sure length is not negative
    
    fixes oss-fuzz/8469

diff --git a/poppler/Parser.cc b/poppler/Parser.cc
index 7ed297cb..ce91e325 100644
--- a/poppler/Parser.cc
+++ b/poppler/Parser.cc
@@ -235,6 +235,9 @@ Stream *Parser::makeStream(Object &&dict, Guchar *fileKey,
       pos = pos - 1;
       lexer->lookCharLastValueCached = Lexer::LOOK_VALUE_NOT_CACHED;
   }
+  if (unlikely(length < 0)) {
+      return nullptr;
+  }
   if (unlikely(pos > LONG_LONG_MAX - length)) {
       return nullptr;
   }


More information about the poppler mailing list