summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-01-08 18:50:04 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-01-08 18:50:04 +1100
commitc4dc4f5bac9e19a99a4d391e98d012c94c647ca4 (patch)
tree8c24921b3544bd1452686e3d78e08373714070b2
parent70d87693f4880c7acd6f50bf2aa8697b722024e7 (diff)
- halex@cvs.openbsd.org 2009/11/22 13:18:00
[sftp.c] make passing of zero-length arguments to ssh safe by passing "-<switch>" "<value>" rather than "-<switch><value>" ok dtucker@, guenther@, djm@
-rw-r--r--ChangeLog5
-rw-r--r--sftp.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a2a0e322..6d6dacd88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -87,6 +87,11 @@
87 to expand EXPAND_MAX_KEYS, allowing only EXPAND_MAX_KEYS-1 to actually 87 to expand EXPAND_MAX_KEYS, allowing only EXPAND_MAX_KEYS-1 to actually
88 work. Note that nothing in OpenSSH actually uses close to this limit at 88 work. Note that nothing in OpenSSH actually uses close to this limit at
89 present. bz#1607 from Jan.Pechanec AT Sun.COM 89 present. bz#1607 from Jan.Pechanec AT Sun.COM
90 - halex@cvs.openbsd.org 2009/11/22 13:18:00
91 [sftp.c]
92 make passing of zero-length arguments to ssh safe by
93 passing "-<switch>" "<value>" rather than "-<switch><value>"
94 ok dtucker@, guenther@, djm@
90 95
9120091226 9620091226
92 - (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1 97 - (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1
diff --git a/sftp.c b/sftp.c
index 85e5505b5..2ce7cc1e1 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp.c,v 1.112 2009/11/20 00:54:01 djm Exp $ */ 1/* $OpenBSD: sftp.c,v 1.113 2009/11/22 13:18:00 halex Exp $ */
2/* 2/*
3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -1719,7 +1719,8 @@ main(int argc, char **argv)
1719 case 'c': 1719 case 'c':
1720 case 'i': 1720 case 'i':
1721 case 'o': 1721 case 'o':
1722 addargs(&args, "-%c%s", ch, optarg); 1722 addargs(&args, "-%c", ch);
1723 addargs(&args, "%s", optarg);
1723 break; 1724 break;
1724 case 'q': 1725 case 'q':
1725 showprogress = 0; 1726 showprogress = 0;