texlive[46069] Build/source/texk/web2c/pdftexdir/tounicode.c:
commits+karl at tug.org
commits+karl at tug.org
Fri Dec 15 17:42:00 CET 2017
Revision: 46069
http://tug.org/svn/texlive?view=revision&revision=46069
Author: karl
Date: 2017-12-15 17:41:59 +0100 (Fri, 15 Dec 2017)
Log Message:
-----------
(deftounicode): check that \pdfglyphtounicode target is in range [pdftex r786]
Revision Links:
--------------
http://tug.org/svn/texlive?view=revision&revision=786
Modified Paths:
--------------
trunk/Build/source/texk/web2c/pdftexdir/tounicode.c
Modified: trunk/Build/source/texk/web2c/pdftexdir/tounicode.c
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/tounicode.c 2017-12-15 12:01:43 UTC (rev 46068)
+++ trunk/Build/source/texk/web2c/pdftexdir/tounicode.c 2017-12-15 16:41:59 UTC (rev 46069)
@@ -1,5 +1,5 @@
/*
-Copyright 2006-2014 Han The Thanh, <thanh at pdftex.org>
+Copyright 2006-2017 Han The Thanh, <thanh at pdftex.org>
This file is part of pdfTeX.
@@ -75,7 +75,7 @@
p++; /* ignore leading spaces */
l = strlen(p);
while (l > 0 && p[l - 1] == ' ')
- l--; /* ignore traling spaces */
+ l--; /* ignore trailing spaces */
valid_unistr = 1; /* a unicode value is the most common case */
for (i = 0; i < l; i++) {
if (p[i] == ' ')
@@ -117,6 +117,11 @@
} else {
i = sscanf(p, "%lX", &(gu->code));
assert(i == 1);
+ if (gu->code < 0 || gu->code > 0x10FFFF) {
+ pdftex_warn("ToUnicode: value out of range [0,10FFFF]: %X",
+ gu->code);
+ gu->code = UNI_UNDEF;
+ }
}
aa = avl_probe(glyph_unicode_tree, gu);
assert(aa != NULL);
More information about the tex-live-commits
mailing list