[poppler] poppler/Stream.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 6 08:17:15 UTC 2019


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

New commits:
commit ff1ab1b0c9b265df1fd07380cd78ca0daa63d642
Author: Vincent Le Garrec <legarrec.vincent at gmail.com>
Date:   Sat Feb 2 04:25:52 2019 +0100

    Undefined-shift in StreamPredictor::getNextLine
    
    oss-fuzz/10284

diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index 25ec3c68..6a6b46a2 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -35,6 +35,7 @@
 // Copyright (C) 2017 Jose Aliste <jaliste at src.gnome.org>
 // Copyright (C) 2017 Kay Dohmann <k.dohmann at gmx.net>
 // Copyright (C) 2019 Christian Persch <chpe at src.gnome.org>
+// Copyright (C) 2019 LE GARREC Vincent <legarrec.vincent at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -712,7 +713,7 @@ bool StreamPredictor::getNextLine() {
       j = k = pixBytes;
       for (i = 0; i < width; ++i) {
 	for (kk = 0; kk < nComps; ++kk) {
-	  if (inBits < nBits) {
+	  while (inBits < nBits) {
 	    inBuf = (inBuf << 8) | (predLine[j++] & 0xff);
 	    inBits += 8;
 	  }


More information about the poppler mailing list