texlive[49860] Build/source/texk/web2c/pmpostdir: forbid too long
commits+kakuto at tug.org
commits+kakuto at tug.org
Tue Jan 29 05:08:27 CET 2019
Revision: 49860
http://tug.org/svn/texlive?view=revision&revision=49860
Author: kakuto
Date: 2019-01-29 05:08:26 +0100 (Tue, 29 Jan 2019)
Log Message:
-----------
forbid too long kanji option.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/pmpostdir/ChangeLog
trunk/Build/source/texk/web2c/pmpostdir/pmpost.ch
Modified: trunk/Build/source/texk/web2c/pmpostdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/pmpostdir/ChangeLog 2019-01-29 01:23:49 UTC (rev 49859)
+++ trunk/Build/source/texk/web2c/pmpostdir/ChangeLog 2019-01-29 04:08:26 UTC (rev 49860)
@@ -1,6 +1,7 @@
2019-01-29 Akira Kakuto <kakuto at w32tex.org>
* pmpost.ch: adapt to the new mpost.w.
+ Forbid too long kanji option.
2018-12-21 Karl Berry <karl at freefriends.org>
Modified: trunk/Build/source/texk/web2c/pmpostdir/pmpost.ch
===================================================================
--- trunk/Build/source/texk/web2c/pmpostdir/pmpost.ch 2019-01-29 01:23:49 UTC (rev 49859)
+++ trunk/Build/source/texk/web2c/pmpostdir/pmpost.ch 2019-01-29 04:08:26 UTC (rev 49860)
@@ -98,9 +98,14 @@
} else if (ARGUMENT_IS ("interaction")) {
@y
} else if (ARGUMENT_IS ("kanji")) {
- strcpy(kanjioption, optarg);
- if(!set_enc_string(optarg, optarg)) {
- fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg);
+ if (optarg) {
+ if (strlen(optarg) > 15) {
+ optarg[15] = '\0';
+ }
+ strcpy(kanjioption, optarg);
+ if (!set_enc_string(optarg, optarg)) {
+ fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg);
+ }
}
} else if (ARGUMENT_IS ("interaction")) {
@@ -120,9 +125,14 @@
} else if (option_is ("progname")) {
user_progname = optarg;
} else if (option_is ("kanji")) {
- strcpy (kanjioption, optarg);
- if(!set_enc_string(optarg, optarg)) {
- fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg);
+ if (optarg) {
+ if (strlen(optarg) > 15) {
+ optarg[15] = '\0';
+ }
+ strcpy (kanjioption, optarg);
+ if (!set_enc_string(optarg, optarg)) {
+ fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg);
+ }
}
@z
More information about the tex-live-commits
mailing list