[poppler] poppler/CharCodeToUnicode.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Jun 3 13:02:16 PDT 2009
poppler/CharCodeToUnicode.cc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit e80d645c34c7d44d1f35da0a25669d1c4cde6e7f
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Jun 3 22:00:49 2009 +0200
Also accept tokens with to leading 00
Fixes bug 22025, based on a patch by William Bader
diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc
index 0cbb4d7..5941190 100644
--- a/poppler/CharCodeToUnicode.cc
+++ b/poppler/CharCodeToUnicode.cc
@@ -13,7 +13,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
-// Copyright (C) 2006, 2008 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006, 2008, 2009 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2007 Julien Rebetez <julienr at svn.gnome.org>
// Copyright (C) 2007 Koji Otani <sho at bbr.jp>
// Copyright (C) 2008 Michael Vrable <mvrable at cs.ucsd.edu>
@@ -281,8 +281,11 @@ void CharCodeToUnicode::parseCMap1(int (*getCharFunc)(void *), void *data,
}
if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
tok2[0] == '<' && tok2[n2 - 1] == '>')) {
- error(-1, "Illegal entry in bfchar block in ToUnicode CMap");
- continue;
+ if (!(n1 == 4 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0' &&
+ tok2[0] == '<' && tok2[n2 - 1] == '>')) {
+ error(-1, "Illegal entry in bfchar block in ToUnicode CMap");
+ continue;
+ }
}
tok1[n1 - 1] = tok2[n2 - 1] = '\0';
if (sscanf(tok1 + 1, "%x", &code1) != 1) {
More information about the poppler
mailing list