[Top][All Lists]

[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


                 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



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.


#include <stdio.h>

int main(int argc, char *argv[])
        return 0;

> gcc -Wall -o argv1.exe argv1.c

$ cat Makefile
.PHONY: all

SHELL = cmd.exe

        @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



Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]