mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 02:46:58 +00:00
scp.c: Port OpenSSH CVE-2018-20685 fix (#80)
This commit is contained in:
parent
90cfbe1f7a
commit
8f8a3dff70
3
scp.c
3
scp.c
@ -935,7 +935,8 @@ sink(int argc, char **argv)
|
||||
size = size * 10 + (*cp++ - '0');
|
||||
if (*cp++ != ' ')
|
||||
SCREWUP("size not delimited");
|
||||
if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {
|
||||
if (*cp == '\0' || strchr(cp, '/') != NULL ||
|
||||
strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) {
|
||||
run_err("error: unexpected filename: %s", cp);
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user