[poppler] poppler/CMap.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jan 27 16:43:16 UTC 2019


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

New commits:
commit 181db8ab737c2fbf73b1706879d00d97a72426d3
Author: LE GARREC Vincent <gitlab-freedesktop at le-garrec.fr>
Date:   Sun Jan 27 16:43:15 2019 +0000

    ofz-8467: Undefined-shift in CMap::addCIDs

diff --git a/poppler/CMap.cc b/poppler/CMap.cc
index 4c5f6fbf..9953db32 100644
--- a/poppler/CMap.cc
+++ b/poppler/CMap.cc
@@ -18,6 +18,7 @@
 // Copyright (C) 2013 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2017 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2018 Adam Reichold <adam.reichold at t-online.de>
+// 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
@@ -391,6 +392,10 @@ void CMap::addCIDs(unsigned int start, unsigned int end, unsigned int nBytes, CI
   int byte;
   unsigned int i, j;
 
+  if (nBytes > 4) {
+    error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap");
+    return;
+  }
   vec = vector;
   for (i = nBytes - 1; i >= 1; --i) {
     byte = (start >> (8 * i)) & 0xff;


More information about the poppler mailing list