poppler/Stream.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 72183a3ff881316bb470cc0f6db08cf9ef044e53 Author: Albert Astals Cid <[email protected]> Date: Sun Jan 3 12:10:55 2021 +0100 Don't wrap EOFStream in an EOFStream It's unneeded and can be relatively easily used to create stack overflows oss-fuzz/29184 diff --git a/poppler/Stream.cc b/poppler/Stream.cc index fb36e712..3518c257 100644 --- a/poppler/Stream.cc +++ b/poppler/Stream.cc @@ -196,7 +196,11 @@ Stream *Stream::addFilters(Dict *dict, int recursion) str = makeFilter(obj2.getName(), str, ¶ms2, recursion); } else { error(errSyntaxError, getPos(), "Bad filter name"); - str = new EOFStream(str); + if (dynamic_cast<EOFStream *>(str)) { + // str is already a EOFStream, no need to wrap it in another EOFStream + } else { + str = new EOFStream(str); + } } } } else if (!obj.isNull()) { _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
