Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > a1f51f90016c541b2c679ee9b4f27cf3 > files > 14

openssh-7.5p1-2.3.mga6.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)) < 0) {
--