diff options
author | 2006-01-31 10:35:43 +0000 | |
---|---|---|
committer | 2006-01-31 10:35:43 +0000 | |
commit | 264617a81b74a48aff075ae39b67a29fcc98275f (patch) | |
tree | c0b9cd15c6efe6db02507a580816574f46154b6a | |
parent | regression test for CVE-2006-0225 written by dtucker@ (diff) | |
download | wireguard-openbsd-264617a81b74a48aff075ae39b67a29fcc98275f.tar.xz wireguard-openbsd-264617a81b74a48aff075ae39b67a29fcc98275f.zip |
"scp a b c" shouldn't clobber "c" when it is not a directory, report and
fix from biorn@; ok markus@
-rw-r--r-- | usr.bin/ssh/scp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index bacefe17708..d913838e20e 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -71,7 +71,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.129 2006/01/31 10:19:02 djm Exp $"); +RCSID("$OpenBSD: scp.c,v 1.130 2006/01/31 10:35:43 djm Exp $"); #include "xmalloc.h" #include "atomicio.h" @@ -378,9 +378,9 @@ main(int argc, char **argv) if ((targ = colon(argv[argc - 1]))) /* Dest is remote host. */ toremote(targ, argc, argv); else { - tolocal(argc, argv); /* Dest is local host. */ if (targetshouldbedirectory) verifydir(argv[argc - 1]); + tolocal(argc, argv); /* Dest is local host. */ } /* * Finally check the exit status of the ssh process, if one was forked |