diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2007-12-12 05:04:04 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2007-12-12 05:04:04 +0000 |
commit | 7d6a02d621e2c4a5834c8a691f726cc4731be772 (patch) | |
tree | b22d5f8ca11342251c24bf779b212b2b7bbb2c7d /usr.bin | |
parent | f7124ff7ff0ecddc526f55e537660e9ed319dbee (diff) |
unbreak lls command and add a regress test that would have caught the
breakage; spotted by mouring@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sftp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 942b85ca613..7f31ebcffea 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.97 2007/10/24 03:30:02 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.98 2007/12/12 05:04:03 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -1068,6 +1068,8 @@ parse_args(const char **cpp, int *pflag, int *lflag, int *iflag, *path1 = xstrdup(argv[optidx]); break; case I_LLS: + /* Skip ls command and following whitespace */ + cp = cp + strlen(cmd) + strspn(cp, WHITESPACE); case I_SHELL: /* Uses the rest of the line */ break; |