diff options
Diffstat (limited to 'net-misc/netkit-rsh/files/patches/210_all_checkdir-r1.patch')
-rw-r--r-- | net-misc/netkit-rsh/files/patches/210_all_checkdir-r1.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/net-misc/netkit-rsh/files/patches/210_all_checkdir-r1.patch b/net-misc/netkit-rsh/files/patches/210_all_checkdir-r1.patch new file mode 100644 index 000000000000..4fde40315503 --- /dev/null +++ b/net-misc/netkit-rsh/files/patches/210_all_checkdir-r1.patch @@ -0,0 +1,23 @@ +--- a/rcp/rcp.c ++++ b/rcp/rcp.c +@@ -716,6 +716,11 @@ + size = size * 10 + (*cp++ - '0'); + if (*cp++ != ' ') + SCREWUP("size not delimited"); ++ if (*cp == '\0' || strchr(cp, '/') != NULL || ++ strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { ++ error("error: unexpected filename: %s", cp); ++ exit(1); ++ } + if (targisdir) { + static char *namebuf; + static int cursize; +@@ -735,6 +739,8 @@ + np = targ; + exists = stat(np, &stb) == 0; + if (buf[0] == 'D') { ++ if (!iamrecursive) ++ SCREWUP("received directory without -r"); + if (exists) { + if ((stb.st_mode&S_IFMT) != S_IFDIR) { + errno = ENOTDIR; |