mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-18 11:27:37 +00:00
[SV 56449] (Windows) Use slow path if '%' appears in the command
* src/job.c (sh_chars_dos): Add '%' as a special character * src/job.c (construct_command_argv_internal): Check for '%' in quotes For the windows version of make, a recipe line cannot be executed diretly by make (without a shell) if a '%' character is present. This character starts a cmd.exe escape sequence. Signed-off-by: Christian Eggers <ceggers@arri.de> Copyright-paperwork-exempt: yes
This commit is contained in:
parent
d7cfbf1961
commit
38e96eadea
1 changed files with 3 additions and 3 deletions
|
@ -2660,7 +2660,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
|
|||
can handle quoted file names just fine, removing the quote lifts
|
||||
the limit from a very frequent use case, because using quoted
|
||||
file names is commonplace on MS-Windows. */
|
||||
static const char *sh_chars_dos = "|&<>";
|
||||
static const char *sh_chars_dos = "|&<>%";
|
||||
static const char *sh_cmds_dos[] =
|
||||
{ "assoc", "break", "call", "cd", "chcp", "chdir", "cls", "color", "copy",
|
||||
"ctty", "date", "del", "dir", "echo", "echo.", "endlocal", "erase",
|
||||
|
@ -2861,9 +2861,9 @@ 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
|
||||
/* Quoted wildcard and % characters must be passed quoted to the
|
||||
command, so give up the fast route. */
|
||||
else if (instring == '"' && strchr ("*?", *p) != 0 && !unixy_shell)
|
||||
else if (instring == '"' && strchr ("*?%", *p) != 0 && !unixy_shell)
|
||||
goto slow;
|
||||
else if (instring == '"' && strncmp (p, "\\\"", 2) == 0)
|
||||
*ap++ = *++p;
|
||||
|
|
Loading…
Reference in a new issue