diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-02-01 04:41:12 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-02-01 04:41:12 +0000 |
commit | a40e4295260793e44bbfed4be68050c38e197f3e (patch) | |
tree | defe1e45c701f505ce1b5c6e796103515580e350 /Build/source/texk/web2c | |
parent | 89b3cef29b418b969f4ec641f77ae81515e55b53 (diff) |
web2c/lib/texmfmp.c: avoid a crash in xelatex
git-svn-id: svn://tug.org/texlive/trunk@43113 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 7aa1516b480..390ae351183 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,9 @@ +2017-02-01 Akira Kakuto <kakuto@fuk.kinidai.ac.jp> + + * texmfmp.c: Avoid a crash in xelatex for + http://tug.org/pipermail/xetex/2017-January/026975.html. + It is not a fix but a stopgap. + 2017-01-02 Akira Kakuto <kakuto@fuk.kinidai.ac.jp> * printversion.c: 2016 ---> 2017. diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index 540837ad62c..47086d9bc0a 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -2818,6 +2818,8 @@ gettexstring (strnumber s) unsigned bytesToWrite = 0; poolpointer len, i, j; string name; + if (strstart[s + 1 - 65536L] < strstart[s - 65536L]) + return NULL; len = strstart[s + 1 - 65536L] - strstart[s - 65536L]; name = xmalloc(len * 3 + 1); /* max UTF16->UTF8 expansion (code units, not bytes) */ |