[sftp-int.c]
     fix div by zero when listing for filename lengths longer than width.
     markus@ ok.
This commit is contained in:
Darren Tucker 2003-08-26 12:12:56 +10:00
parent 600ad8de76
commit 7858726e8a
2 changed files with 8 additions and 2 deletions

View File

@ -22,6 +22,10 @@
- deraadt@cvs.openbsd.org 2003/08/24 17:36:52
[monitor.c monitor_wrap.c sshconnect2.c]
64 bit cleanups; markus ok
- fgsch@cvs.openbsd.org 2003/08/25 08:13:09
[sftp-int.c]
fix div by zero when listing for filename lengths longer than width.
markus@ ok.
- (dtucker) [Makefile.in acconfig.h auth-krb5.c auth-pam.c auth-pam.h
configure.ac defines.h gss-serv-krb5.c session.c ssh-gss.h sshconnect1.c
sshconnect2.c] Add Portable GSSAPI support, patch by Simon Wilkinson.
@ -897,4 +901,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.2912 2003/08/26 02:10:48 dtucker Exp $
$Id: ChangeLog,v 1.2913 2003/08/26 02:12:56 dtucker Exp $

View File

@ -25,7 +25,7 @@
/* XXX: recursive operations */
#include "includes.h"
RCSID("$OpenBSD: sftp-int.c,v 1.61 2003/07/19 00:45:53 djm Exp $");
RCSID("$OpenBSD: sftp-int.c,v 1.62 2003/08/25 08:13:09 fgsch Exp $");
#include "buffer.h"
#include "xmalloc.h"
@ -600,6 +600,7 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
width = ws.ws_col;
columns = width / (m + 2);
columns = MAX(columns, 1);
colspace = width / columns;
}
@ -686,6 +687,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
width = ws.ws_col;
columns = width / (m + 2);
columns = MAX(columns, 1);
colspace = width / columns;
}