Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 1bde0bcef1c3a79294422c4f9ba86aa7 > files > 7

openssh-9.3p1-2.mga9.src.rpm

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