mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-12 18:13:50 -05:00
Back off a bit of that vulnerability fix, which was breaking `pscp
host:wildcard* .' and suchlike. [originally from svn r790]
This commit is contained in:
parent
a739876719
commit
6928fbb1e3
6
scp.c
6
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user