X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/90a14a09e9d86c5de8f3985227aa65a6a49c87cc..9853b9125c142b77f583aa4736733728c37d0bea:/scp.c diff --git a/scp.c b/scp.c index 0f20b256..03bdfbc9 100644 --- a/scp.c +++ b/scp.c @@ -828,12 +828,6 @@ static void sink(char *targ, char *src) if (sscanf(buf+1, "%u %lu %[^\n]", &mode, &size, namebuf) != 3) bump("Protocol error: Illegal file descriptor format"); /* Security fix: ensure the file ends up where we asked for it. */ - if (src) { - char *p = src + strlen(src); - while (p > src && p[-1] != '/' && p[-1] != '\\') - p--; - strcpy(namebuf, p); - } if (targisdir) { char t[2048]; char *p;