poppler/Parser.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 12adb97e5a0e28434dfdf94edf52bb3a92aa3910 Author: Albert Astals Cid <[email protected]> Date: Tue May 22 19:42:38 2018 +0200 Parser::makeStream: Fix potential integer overflow diff --git a/poppler/Parser.cc b/poppler/Parser.cc index 869e94ad..8ebe7b89 100644 --- a/poppler/Parser.cc +++ b/poppler/Parser.cc @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2006, 2009, 201, 2010, 2013, 2014, 2017 Albert Astals Cid <[email protected]> +// Copyright (C) 2006, 2009, 201, 2010, 2013, 2014, 2017, 2018 Albert Astals Cid <[email protected]> // Copyright (C) 2006 Krzysztof Kowalczyk <[email protected]> // Copyright (C) 2009 Ilya Gorenbein <[email protected]> // Copyright (C) 2012 Hib Eris <[email protected]> @@ -235,6 +235,9 @@ Stream *Parser::makeStream(Object &&dict, Guchar *fileKey, pos = pos - 1; lexer->lookCharLastValueCached = Lexer::LOOK_VALUE_NOT_CACHED; } + if (unlikely((pos > LONG_LONG_MAX - length)) { + return nullptr; + } lexer->setPos(pos + length); // refill token buffers and check for 'endstream' _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
