summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-11 17:10:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-11 17:10:26 +0000
commit93694c88c8ba08f05ccc6cb4f55cefd485636c96 (patch)
tree00a0586c7081403578c87cecd14cb72a9e2abcfd /usr.bin
parent007d01d41f95b61251c9834e840f660ee3b27b7c (diff)
do not walk off the prefix array, off by one; found by parfait
ok jsg millert
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ftp/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c
index ee272ed1986..4e16e7690bc 100644
--- a/usr.bin/ftp/util.c
+++ b/usr.bin/ftp/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.63 2009/05/10 16:31:17 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.64 2009/11/11 17:10:25 deraadt Exp $ */
/* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */
/*-
@@ -826,7 +826,7 @@ progressmeter(int flag, const char *filename)
i = 0;
abbrevsize = cursize;
- while (abbrevsize >= 100000 && i < sizeof(prefixes)) {
+ while (abbrevsize >= 100000 && i < sizeof(prefixes)-1) {
i++;
abbrevsize >>= 10;
}