summaryrefslogtreecommitdiff
path: root/Build/source/texk/dviout-util
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dviout-util')
-rw-r--r--Build/source/texk/dviout-util/ChangeLog4
-rw-r--r--Build/source/texk/dviout-util/chkdvifont.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/Build/source/texk/dviout-util/ChangeLog b/Build/source/texk/dviout-util/ChangeLog
index 6a655abf6ac..9bbc045a6c6 100644
--- a/Build/source/texk/dviout-util/ChangeLog
+++ b/Build/source/texk/dviout-util/ChangeLog
@@ -1,3 +1,7 @@
+2019-02-25 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * chkdvifont.c: Forbid too long file name.
+
2019-02-06 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
* chkdvifont.c: Detect new JFM spec.
diff --git a/Build/source/texk/dviout-util/chkdvifont.c b/Build/source/texk/dviout-util/chkdvifont.c
index 103285dda10..42515bb1d6b 100644
--- a/Build/source/texk/dviout-util/chkdvifont.c
+++ b/Build/source/texk/dviout-util/chkdvifont.c
@@ -320,6 +320,11 @@ int main(int argc, char **argv)
}
}
+ if(strlen(argv[argc-1]) >= MAXPATH) {
+ fprintf(stderr, "Too long filename\n");
+ exit(255);
+ }
+
/* check file extension */
if (!f_t){
pt = argv[argc-1];