[Poppler-bugs] [Bug 22025] patch to fix message about illegal entry in bfchar block in ToUnicode CMap
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jun 3 12:08:03 PDT 2009
http://bugs.freedesktop.org/show_bug.cgi?id=22025
--- Comment #4 from Albert Astals Cid <tsdgeos at terra.es> 2009-06-03 12:08:03 PST ---
What do you think of this?
diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc
index 0cbb4d7..b278d58 100644
--- a/poppler/CharCodeToUnicode.cc
+++ b/poppler/CharCodeToUnicode.cc
@@ -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) {
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Poppler-bugs
mailing list