poppler/Stream.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 55eb5c73e5fb609ba56dee28f74e53b2be28fbb7 Author: Albert Astals Cid <[email protected]> Date: Wed Aug 26 22:37:31 2020 +0200 BaseMemStream::getChars: If we're past the end do nothing diff --git a/poppler/Stream.h b/poppler/Stream.h index 245f0ab7..5d9ad0c9 100644 --- a/poppler/Stream.h +++ b/poppler/Stream.h @@ -694,7 +694,10 @@ private: { int n; - if (nChars <= 0) { + if (unlikely(nChars <= 0)) { + return 0; + } + if (unlikely(bufPtr >= bufEnd)) { return 0; } if (bufEnd - bufPtr < nChars) { _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
