jonathancammack / rpms / openssh

Forked from rpms/openssh 8 months ago
Clone

Blame SOURCES/openssh-6.6.1p1-scp-non-existing-directory.patch

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