diff options
Diffstat (limited to 'crypto/openssh/scp.c')
-rw-r--r-- | crypto/openssh/scp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/openssh/scp.c b/crypto/openssh/scp.c index 60682c68769b..817880206684 100644 --- a/crypto/openssh/scp.c +++ b/crypto/openssh/scp.c @@ -1106,7 +1106,8 @@ sink(int argc, char **argv) SCREWUP("size out of range"); size = (off_t)ull; - 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); } |