summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scp.c b/scp.c
index ed2864250..7163d33dc 100644
--- a/scp.c
+++ b/scp.c
@@ -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 }