poppler/Hints.cc |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a73c80e024e8b2a9613926793165da07017dfbb2
Author: Vincent Le Garrec <[email protected]>
Date:   Sat Jan 26 09:05:14 2019 +0100

    ofz-8516: Undefined-shift in StreamBitReader::readBits
    
    https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8516

diff --git a/poppler/Hints.cc b/poppler/Hints.cc
index 5c93eebf..e6039f4d 100644
--- a/poppler/Hints.cc
+++ b/poppler/Hints.cc
@@ -10,6 +10,7 @@
 // Copyright 2013 Adrian Johnson <[email protected]>
 // Copyright 2014 Fabio D'Urso <[email protected]>
 // Copyright 2016 Jeffrey Morlan <[email protected]>
+// Copyright 2019 LE GARREC Vincent <[email protected]>
 //
 //========================================================================
 
@@ -416,7 +417,11 @@ bool Hints::readSharedObjectsTable(Stream *str)
   sbr.resetInputBits(); // reset on byte boundary. Not in specs!
   for (unsigned int i = 0; i < nSharedGroups && !sbr.atEOF(); i++) {
     if (groupHasSignature[i]) {
-       sbr.readBits(128);
+       // readBits doesn't supports more than 32 bits.
+       sbr.readBits(32);
+       sbr.readBits(32);
+       sbr.readBits(32);
+       sbr.readBits(32);
     }
   }
   if (sbr.atEOF())
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to