summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-02-25 14:46:59 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-02-25 14:46:59 +0000
commitf11e212b25c90798a6921d26c50c464408cde72e (patch)
tree011353bc008b5ab4944d77fc1d7021ca4fa0dde6 /Build
parent7bfcc059ce927f132e0598667603f54ba49fbd77 (diff)
chkdvifont.c: forbid too long file name
git-svn-id: svn://tug.org/texlive/trunk@50125 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-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];