From ba84d96d923e2fc59e3fe933bccb8e54bbe7c3de Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 31 Oct 2000 09:29:05 +0000 Subject: [PATCH] Back off a bit of that vulnerability fix, which was breaking `pscp host:wildcard* .' and suchlike. git-svn-id: svn://svn.tartarus.org/sgt/putty@790 cda61777-01e9-0310-a592-d414129be87e --- scp.c | 6 ------ 1 file changed, 6 deletions(-) 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; -- 2.11.0