diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2010-05-24 15:38:40 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2010-05-24 15:38:40 +0000 |
commit | 2955d47562cb9423130327ebbb4493f62e9d6d7d (patch) | |
tree | c590a8fe779508ee517829d6c9df8de199d22402 /Build | |
parent | 8c8b08eeb9128bd27d0122440ec888eda59f1fa0 (diff) |
correct the previous change.
git-svn-id: svn://tug.org/texlive/trunk@18448 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index f2b9161a7dd..6bfe2ea1338 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -415,14 +415,18 @@ shell_cmd_is_allowed (const char *cmd, char **safecmd, char **cmdname) r = *safecmd; while (*r && !Isspace(*r)) r++; - *r = '\0'; - r++; - while (*r && Isspace(*r)) - r++; - if (*r) - q = (char *) concatn ("\"", p, "/", *safecmd, "\" ", r, NULL); - else + if (*r == '\0') q = (char *) concatn ("\"", p, "/", *safecmd, "\"", NULL); + else { + *r = '\0'; + r++; + while (*r && Isspace(*r)) + r++; + if (*r) + q = (char *) concatn ("\"", p, "/", *safecmd, "\" ", r, NULL); + else + q = (char *) concatn ("\"", p, "/", *safecmd, "\"", NULL); + } free (p); free (*safecmd); *safecmd = q; |