[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-diffutils] Missing argument in shell_quote_copy
From: |
Juan Manuel Guerrero |
Subject: |
[bug-diffutils] Missing argument in shell_quote_copy |
Date: |
Sun, 14 Feb 2010 00:34:02 +0100 |
User-agent: |
KMail/1.9.10 |
I have tried to compile diffutils using a system that uses popen/pclose to
emulate pipe support. This has failed because the required arguments are not
passed to shell_quote_copy. See patch below.
Regards,
Juan M. Guerrero
diff -aprNU5 diffutils-2.9.orig/src/sdiff.c diffutils-2.9/src/sdiff.c
--- diffutils-2.9.orig/src/sdiff.c 2010-02-11 09:39:16 +0000
+++ diffutils-2.9/src/sdiff.c 2010-02-14 00:16:30 +0000
@@ -627,11 +627,11 @@ main (int argc, char *argv[])
for (i = 0; diffargv[i]; i++)
cmdsize += shell_quote_length (diffargv[i]) + 1;
command = p = xmalloc (cmdsize);
for (i = 0; diffargv[i]; i++)
{
- p = shell_quote_copy (diffargv[i]);
+ p = shell_quote_copy (p, diffargv[i]);
*p++ = ' ';
}
p[-1] = 0;
errno = 0;
diffout = popen (command, "r");
diff -aprNU5 diffutils-2.9.orig/src/util.c diffutils-2.9/src/util.c
--- diffutils-2.9.orig/src/util.c 2010-02-11 09:39:16 +0000
+++ diffutils-2.9/src/util.c 2010-02-14 00:06:30 +0000
@@ -226,11 +226,11 @@ begin_output (void)
char *command = xmalloc (sizeof pr_program - 1 + 7
+ shell_quote_length (name) + 1);
char *p;
sprintf (command, "%s -f -h ", pr_program);
p = command + sizeof pr_program - 1 + 7;
- p = shell_quote_copy (name);
+ p = shell_quote_copy (p, name);
*p = 0;
errno = 0;
outfile = popen (command, "w");
if (!outfile)
pfatal_with_name (command);
- [bug-diffutils] Missing argument in shell_quote_copy,
Juan Manuel Guerrero <=