Debian Codegraph @

debian/patches/1054218.patch

raw
1 From: Thanh Han The <[email protected]>
2 Subject: pdflatex failures on big-endian architectures (s390x)
3 Origin: upstream
4
5 --- a/texk/web2c/pdftexdir/tounicode.c 2023/10/27 15:39:07 911
6 +++ b/texk/web2c/pdftexdir/tounicode.c 2023/10/27 15:40:08 912
7 @@ -66,6 +66,7 @@ void deftounicode(strnumber glyph, strnu
8 int i, l;
9 glyph_unicode_entry *gu, t;
10 void **aa;
11 + unsigned long sscan_result;
12
13 p = makecstring(glyph);
14 assert(strlen(p) < SMALL_BUF_SIZE);
15 @@ -115,13 +116,15 @@ void deftounicode(strnumber glyph, strnu
16 gu->code = UNI_STRING;
17 gu->unicode_seq = xstrdup(buf2);
18 } else {
19 - i = sscanf(p, "%lX", &(gu->code));
20 + i = sscanf(p, "%lX", &sscan_result);
21 assert(i == 1);
22 - if (gu->code < 0 || gu->code > 0x10FFFF) {
23 + if (sscan_result > 0x10FFFF) {
24 pdftex_warn("ToUnicode: value out of range [0,10FFFF]: %lX",
25 - gu->code);
26 + sscan_result);
27 gu->code = UNI_UNDEF;
28 }
29 + else
30 + gu->code = sscan_result;
31 }
32 aa = avl_probe(glyph_unicode_tree, gu);
33 assert(aa != NULL);