1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
Bug fix, backport from poppler-0.14.5
Index: CharCodeToUnicode.cc
===================================================================
--- CharCodeToUnicode.cc (revision 12447)
+++ CharCodeToUnicode.cc (working copy)
@@ -5,6 +5,9 @@
// Copyright 2001-2003 Glyph & Cog, LLC
//
//========================================================================
+// Modified for TeX Live by Peter Breitenlohner <tex-live@tug.org>
+// See top-level ChangeLog for a list of all modifications
+//========================================================================
#include <aconf.h>
@@ -243,8 +246,11 @@
}
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) {
@@ -266,8 +272,19 @@
error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
break;
}
- if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
- n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>')) {
+ /* ref:
+ - http://sarovar.org/tracker/index.php?func=detail&aid=4321&group_id=106&atid=493
+ - http://lists.freedesktop.org/archives/poppler-bugs/2010-April/004931.html
+ original was:
+ if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
+ n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>')) {
+ */
+ if (!(((n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>') ||
+ (n1 == 4 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>'
+ && tok1[1] == '0' && tok1[2] == '0')) &&
+ ((n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>') ||
+ (n2 == 4 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>'
+ && tok1[1] == '0' && tok1[2] == '0')))) {
error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
continue;
}
|