diff options
author | dtucker <dtucker> | 2003-08-26 02:12:56 +0000 |
---|---|---|
committer | dtucker <dtucker> | 2003-08-26 02:12:56 +0000 |
commit | 5365eb213818b5d4cef36174c56be011939e2a4a (patch) | |
tree | 1f8a38e9b0237995d18a958787a2c7caf6a575d6 | |
parent | 1e280d5b335eb96bfa98fdda540c87651107ee74 (diff) | |
download | openssh-5365eb213818b5d4cef36174c56be011939e2a4a.tar.gz |
- 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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sftp-int.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -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 $ @@ -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; } |