Summary: | patch to fix message about illegal entry in bfchar block in ToUnicode CMap | ||
---|---|---|---|
Product: | poppler | Reporter: | William Bader <williambader> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | suggested patch to poppler-0.10.7/poppler/CharCodeToUnicode.cc |
Description
William Bader
2009-06-01 14:30:19 UTC
Created attachment 26343 [details] [review] suggested patch to poppler-0.10.7/poppler/CharCodeToUnicode.cc My example file is 3 MB and was too large to post. Contact me by email at williambader@hotmail.com for a copy. Can you please mail the file to aacid@kde.org? 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) { It works for me. Patch commited, will be in next poppler release |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.