[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #56449] job.c (construct_command_argv_internal): Must use shell if
From: |
anonymous |
Subject: |
[bug #56449] job.c (construct_command_argv_internal): Must use shell if '%' character is present in recipe line |
Date: |
Thu, 6 Jun 2019 07:13:35 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Firefox/60.0 |
URL:
<https://savannah.gnu.org/bugs/?56449>
Summary: job.c (construct_command_argv_internal): Must use
shell if '%' character is present in recipe line
Project: make
Submitted by: None
Submitted on: Thu 06 Jun 2019 11:13:33 AM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: SCM
Operating System: MS Windows
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
The slow path must be taken if a shell escape character ('%') is present in
the command line. Otherwise escaped characters on the command line will not be
properly unescaped by the shell.
Demo:
======
argv1.c:
--------%<----------------------
#include <stdio.h>
int main(int argc, char *argv[])
{
puts(argv[1]);
return 0;
}
-------->%----------------------
> gcc -Wall -o argv1.exe argv1.c
Makefile:
--------%<----------------------
$ cat Makefile
.PHONY: all
SHELL = cmd.exe
all:
@argv1 %%
@argv1 "%%"
@argv1 %% > con
-------->%----------------------
*** Please run mingw32-make from cmd.exe, not from Msys shell ***
> mingw32-make.exe
%%
%%
%
Expected result:
%
%
%
Result after applying attached patch:
%
%
%
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 06 Jun 2019 11:13:33 AM UTC Name:
0001-src-job.c-construct_command_argv_internal-Use-shell-.patch Size: 2KiB
By: None
<http://savannah.gnu.org/bugs/download.php?file_id=47045>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56449>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #56449] job.c (construct_command_argv_internal): Must use shell if '%' character is present in recipe line,
anonymous <=