[poppler] poppler/Stream.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 27 18:53:07 UTC 2019


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

New commits:
commit f4136a6353162db249f63ddb0f20611622ab61b4
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Feb 27 19:43:22 2019 +0100

    ImageStream::getLine: fix crash on broken files
    
    Fixes #728

diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index 33537b0e..a41435ab 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -496,6 +496,9 @@ unsigned char *ImageStream::getLine() {
   }
  
   int readChars = str->doGetChars(inputLineSize, inputLine);
+  if (unlikely(readChars == -1)) {
+      readChars = 0;
+  }
   for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = EOF;
   if (nBits == 1) {
     unsigned char *p = inputLine;


More information about the poppler mailing list