skip backslash escape (#340)

This commit is contained in:
Yanbing 2018-08-15 12:53:45 -07:00 committed by GitHub
parent 48e0cdbd5f
commit 3b303808b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
scp.c
View File

@ -508,7 +508,7 @@ main(int argc, char **argv)
convertToForwardslash(p);
else
convertToForwardslash(argdup);
if (glob(argdup, GLOB_NOCHECK, NULL, &g)) {
if (glob(argdup, GLOB_NOCHECK | GLOB_NOESCAPE, NULL, &g)) {
if (expandargc > argc)
newargv = xreallocarray(newargv, expandargc + 1, sizeof(*newargv));
newargv[expandargc++] = xstrdup(argdup);