summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sftp.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9adfbb7b1..d6c114c74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -75,6 +75,9 @@
75 [clientloop.c packet.c serverloop.c session.c ssh-agent.c ssh-keygen.c] 75 [clientloop.c packet.c serverloop.c session.c ssh-agent.c ssh-keygen.c]
76 [ssh.c sshconnect.c sshconnect1.c sshd.c] 76 [ssh.c sshconnect.c sshconnect1.c sshd.c]
77 no need to escape single quotes in comments, no binary change 77 no need to escape single quotes in comments, no binary change
78 - dtucker@cvs.openbsd.org 2005/10/31 06:15:04
79 [sftp.c]
80 Fix sorting with "ls -1" command. From Robert Tsai, "looks right" deraadt@
78 81
7920051102 8220051102
80 - (dtucker) [openbsd-compat/bsd-misc.c] Bug #1108: fix broken strdup(). 83 - (dtucker) [openbsd-compat/bsd-misc.c] Bug #1108: fix broken strdup().
@@ -3208,4 +3211,4 @@
3208 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3211 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3209 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3212 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3210 3213
3211$Id: ChangeLog,v 1.3945 2005/11/05 04:14:59 djm Exp $ 3214$Id: ChangeLog,v 1.3946 2005/11/05 04:15:23 djm Exp $
diff --git a/sftp.c b/sftp.c
index f29927c0f..ff3223ad2 100644
--- a/sftp.c
+++ b/sftp.c
@@ -16,7 +16,7 @@
16 16
17#include "includes.h" 17#include "includes.h"
18 18
19RCSID("$OpenBSD: sftp.c,v 1.67 2005/09/13 23:40:07 djm Exp $"); 19RCSID("$OpenBSD: sftp.c,v 1.68 2005/10/31 06:15:04 dtucker Exp $");
20 20
21#ifdef USE_LIBEDIT 21#ifdef USE_LIBEDIT
22#include <histedit.h> 22#include <histedit.h>
@@ -697,6 +697,8 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
697 } 697 }
698 698
699 if (lflag & SORT_FLAGS) { 699 if (lflag & SORT_FLAGS) {
700 for (n = 0; d[n] != NULL; n++)
701 ; /* count entries */
700 sort_flag = lflag & (SORT_FLAGS|LS_REVERSE_SORT); 702 sort_flag = lflag & (SORT_FLAGS|LS_REVERSE_SORT);
701 qsort(d, n, sizeof(*d), sdirent_comp); 703 qsort(d, n, sizeof(*d), sdirent_comp);
702 } 704 }