summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-01-30 23:33:04 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-01-30 23:33:04 +0000
commit8294246c3d3f6535bdff6b7d5ee7ed9d55a44804 (patch)
tree70b8b5e208c5583374d86b0ef961937be64e29bd
parentf98f780b355bb279f2b6bec1e027ab0d34759000 (diff)
texk/dvipdfm-x: Avoid to crash for unusual ttf
git-svn-id: svn://tug.org/texlive/trunk@39517 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog6
-rw-r--r--Build/source/texk/dvipdfm-x/tt_post.c2
2 files changed, 7 insertions, 1 deletions
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 <kakuto@fuk.kindai.ac.jp>
+
+ * 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 <kakuto@fuk.kindai.ac.jp>
* 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;
}