]> git.ipfire.org Git - thirdparty/make.git/commitdiff
[SV 44348] Fix handling of shell widlcards on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Sat, 28 Feb 2015 12:34:51 +0000 (14:34 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 28 Feb 2015 12:34:51 +0000 (14:34 +0200)
* 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.

job.c

diff --git a/job.c b/job.c
index 6616325b225413f81869984ac3b5765176ecde7e..3d9aec5a0a022b87134006ef795233f719f482aa 100644 (file)
--- 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