summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-02-28 14:34:51 +0200
committerEli Zaretskii <eliz@gnu.org>2015-02-28 14:34:51 +0200
commitb45728b29981078ce7df59c4d09b27c16501439e (patch)
treee26c836262ae17bb393f7a776d189e68db323dc3
parent0c1aa83e432e8ea521f70db6065daf5382eb1426 (diff)
downloadmake-trunk.tar.gz
[SV 44348] Fix handling of shell widlcards on MS-Windows.HEADtrunk
* job.c (construct_command_argv_internal): If shell wildcard characters are found inside a string quoted with "..", give up the fast route and go through the shell. Fixes Savannah bug #44348.
-rw-r--r--job.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/job.c b/job.c
index 6616325b..3d9aec5a 100644
--- a/job.c
+++ b/job.c
@@ -2890,6 +2890,10 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
else if (instring == '"' && strchr ("\\$`", *p) != 0 && unixy_shell)
goto slow;
#ifdef WINDOWS32
+ /* Quoted wildcard characters must be passed quoted to the
+ command, so give up the fast route. */
+ else if (instring == '"' && strchr ("*?", *p) != 0 && !unixy_shell)
+ goto slow;
else if (instring == '"' && strncmp (p, "\\\"", 2) == 0)
*ap++ = *++p;
#endif