[poppler] poppler/Hints.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Feb 10 11:17:27 PST 2014


 poppler/Hints.cc |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 71d4041b061c109a965e72230640cf8ee616dac3
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Feb 10 20:16:46 2014 +0100

    Make sure number of least objects in hints table is valid
    
    Bug #74741

diff --git a/poppler/Hints.cc b/poppler/Hints.cc
index 49e201d..3c2d070 100644
--- a/poppler/Hints.cc
+++ b/poppler/Hints.cc
@@ -176,6 +176,11 @@ void Hints::readPageOffsetTable(Stream *str)
   inputBits = 0; // reset on byte boundary.
 
   nObjectLeast = readBits(32, str);
+  if (nObjectLeast < 1) {
+    error(errSyntaxWarning, -1, "Invalid least number of objects reading page offset hints table");
+    nPages = 0;
+    return;
+  }
 
   objectOffsetFirst = readBits(32, str);
   if (objectOffsetFirst >= hintsOffset) objectOffsetFirst += hintsLength;


More information about the poppler mailing list