Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
poppler
poppler
Commits
0868c499
Commit
0868c499
authored
May 22, 2018
by
Albert Astals Cid
Browse files
Parser::makeStream: Fix potential integer overflow
parent
dbe33067
Changes
1
Hide whitespace changes
Inline
Side-by-side
poppler/Parser.cc
View file @
0868c499
...
...
@@ -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 <aacid@kde.org>
// Copyright (C) 2006, 2009, 201, 2010, 2013, 2014, 2017
, 2018
Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com>
// Copyright (C) 2012 Hib Eris <hib@hiberis.nl>
...
...
@@ -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'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment