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
|
Bug fix, backport from poppler-0.14.5
diff -ur -N xpdf-3.02.orig/xpdf/CharCodeToUnicode.cc xpdf-3.02/xpdf/CharCodeToUnicode.cc
--- xpdf-3.02.orig/xpdf/CharCodeToUnicode.cc 2007-02-27 23:05:52.000000000 +0100
+++ xpdf-3.02/xpdf/CharCodeToUnicode.cc 2010-12-01 09:25:41.108613277 +0100
@@ -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,10 @@
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] == '>')) {
+ 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;
}
|