vishalmishra434 / rpms / openssh

Forked from rpms/openssh 2 months ago
Clone
f5835d
--- a/scp.c	
f5835d
+++ a/scp.c	
f5835d
@@ -1084,6 +1084,10 @@ sink(int argc, char **argv)
f5835d
 			free(vect[0]);
f5835d
 			continue;
f5835d
 		}
f5835d
+		if (buf[0] == 'C' && ! exists && np[strlen(np)-1] == '/') {
f5835d
+			errno = ENOTDIR;
f5835d
+			goto bad;
f5835d
+		}
f5835d
 		omode = mode;
f5835d
 		mode |= S_IWUSR;
f5835d
 		if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) {
f5835d
--