Fixed arguments to sprintf when constructing the expansion of %*. Found by Maurizio De Tommaso.
This commit is contained in:
parent
79d0e25848
commit
c6c9e0c3ac
1 changed files with 1 additions and 1 deletions
2
scp.c
2
scp.c
|
@ -1286,7 +1286,7 @@ for (; *ip && (op < oend); ) {
|
||||||
char quote = '"';
|
char quote = '"';
|
||||||
if (strchr(do_arg[i], quote))
|
if (strchr(do_arg[i], quote))
|
||||||
quote = '\'';
|
quote = '\'';
|
||||||
sprintf(&rbuf[strlen(rbuf)], "%s%s\"", (i != 1) ? " " : "", quote, do_arg[i], quote);
|
sprintf(&rbuf[strlen(rbuf)], "%s%s%s%s\"", (i != 1) ? " " : "", quote, do_arg[i], quote);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sprintf(&rbuf[strlen(rbuf)], "%s%s", (i != 1) ? " " : "", do_arg[i]);
|
sprintf(&rbuf[strlen(rbuf)], "%s%s", (i != 1) ? " " : "", do_arg[i]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue