diff options
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1114,7 +1114,8 @@ sink(int argc, char **argv) | |||
1114 | SCREWUP("size out of range"); | 1114 | SCREWUP("size out of range"); |
1115 | size = (off_t)ull; | 1115 | size = (off_t)ull; |
1116 | 1116 | ||
1117 | if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { | 1117 | if (*cp == '\0' || strchr(cp, '/') != NULL || |
1118 | strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { | ||
1118 | run_err("error: unexpected filename: %s", cp); | 1119 | run_err("error: unexpected filename: %s", cp); |
1119 | exit(1); | 1120 | exit(1); |
1120 | } | 1121 | } |