From 8294246c3d3f6535bdff6b7d5ee7ed9d55a44804 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 30 Jan 2016 23:33:04 +0000 Subject: texk/dvipdfm-x: Avoid to crash for unusual ttf git-svn-id: svn://tug.org/texlive/trunk@39517 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/ChangeLog | 6 ++++++ Build/source/texk/dvipdfm-x/tt_post.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'Build') diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 81dfa1e623b..86189cbc642 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,9 @@ +2016-01-30 Akira Kakuto + + * tt_post.c: Check post->glyphNamePtr[gid] before an access + in tt_get_glyphname(). Reported by Werner LEMBERG: + http://tug.org/pipermail/tex-live/2016-January/037696.html. + 2016-01-19 Akira Kakuto * dpxfile.c: Remove trailing directory separators if any in diff --git a/Build/source/texk/dvipdfm-x/tt_post.c b/Build/source/texk/dvipdfm-x/tt_post.c index 6382675f66f..5137311fe0d 100644 --- a/Build/source/texk/dvipdfm-x/tt_post.c +++ b/Build/source/texk/dvipdfm-x/tt_post.c @@ -174,7 +174,7 @@ tt_lookup_post_table (struct tt_post_table *post, const char *glyphname) char* tt_get_glyphname (struct tt_post_table *post, USHORT gid) { - if (gid < post->count) + if (gid < post->count && post->glyphNamePtr[gid]) return xstrdup(post->glyphNamePtr[gid]); return NULL; } -- cgit v1.2.3