summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-06-23 22:11:40 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-06-23 22:11:40 +0000
commit91e1a0268705fed13c9d902755c55a08409c0ab6 (patch)
tree0e3bc0bc0465b6e44222d9c2ceee6a49b260ab60 /Build/source/texk
parentb60a8ec3bae17122b67e391850588fa670cbe783 (diff)
ttfdump.c: avoid segmentation fault. (by H. Yamashita)
git-svn-id: svn://tug.org/texlive/trunk@44678 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/ttfdump/ChangeLog7
-rw-r--r--Build/source/texk/ttfdump/src/ttfdump.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/Build/source/texk/ttfdump/ChangeLog b/Build/source/texk/ttfdump/ChangeLog
index 5d84a8c5b7e..c86848cfe1b 100644
--- a/Build/source/texk/ttfdump/ChangeLog
+++ b/Build/source/texk/ttfdump/ChangeLog
@@ -1,4 +1,9 @@
-2016-07-15 Adrian Johnson <ajohnson@redneon.com>
+2017-06-23 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * src/ttfdump.c: avoid segmentation fault when the requested
+ ttc font is not found.
+
+2016-07-15 Adrian Johnson <ajohnson@redneon.com>
* libttf/cmap.c,
* libttf/name.c,
diff --git a/Build/source/texk/ttfdump/src/ttfdump.c b/Build/source/texk/ttfdump/src/ttfdump.c
index e374db745cb..e0d71efebad 100644
--- a/Build/source/texk/ttfdump/src/ttfdump.c
+++ b/Build/source/texk/ttfdump/src/ttfdump.c
@@ -163,6 +163,10 @@ main(int argc, char *argv[])
if (strstr (ttfname, "ttc") != NULL)
{
ttc = ttfLoadTTCHeader(ttfname);
+
+ if (ttc == NULL)
+ exit(EXIT_FAILURE);
+
if (collection < ttc->DirCount)
font = ttc->font + collection;
else