diff options
author | Alexander Hall <halex@cvs.openbsd.org> | 2009-11-22 13:18:01 +0000 |
---|---|---|
committer | Alexander Hall <halex@cvs.openbsd.org> | 2009-11-22 13:18:01 +0000 |
commit | e78631e8b7daef8eaa294c98e290ab5647db13b1 (patch) | |
tree | 627795185244cb52911d2401201743882c25ab1e /usr.bin/ssh | |
parent | 8e0dfd9bf9fde630e4a6b6694f3775cdc574fbc5 (diff) |
make passing of zero-length arguments to ssh safe by
passing "-<switch>" "<value>" rather than "-<switch><value>"
ok dtucker@, guenther@, djm@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/sftp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index b9c58f7a43f..1bc68bfc678 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.112 2009/11/20 00:54:01 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.113 2009/11/22 13:18:00 halex Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -1670,7 +1670,8 @@ main(int argc, char **argv) case 'c': case 'i': case 'o': - addargs(&args, "-%c%s", ch, optarg); + addargs(&args, "-%c", ch); + addargs(&args, "%s", optarg); break; case 'q': showprogress = 0; |