summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ssh/scp/scp.c
diff options
context:
space:
mode:
authorHuie-Ying Lee <Huie-Ying.Lee@Sun.COM>2009-03-27 09:52:26 -0700
committerHuie-Ying Lee <Huie-Ying.Lee@Sun.COM>2009-03-27 09:52:26 -0700
commit6c91005f7886574b2d73e4d16fc2ee54833bfd69 (patch)
treeb93824e32a01a3086c0dbd99123534b47738eb46 /usr/src/cmd/ssh/scp/scp.c
parent0fd2682eef78b1fd2fbb5d69ccc03968820967ae (diff)
downloadillumos-gate-6c91005f7886574b2d73e4d16fc2ee54833bfd69.tar.gz
6791293 Array overrun in scp
Diffstat (limited to 'usr/src/cmd/ssh/scp/scp.c')
-rw-r--r--usr/src/cmd/ssh/scp/scp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/src/cmd/ssh/scp/scp.c b/usr/src/cmd/ssh/scp/scp.c
index 2b2bb312f9..88a37e4a3e 100644
--- a/usr/src/cmd/ssh/scp/scp.c
+++ b/usr/src/cmd/ssh/scp/scp.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
@@ -81,8 +81,6 @@
#include "includes.h"
RCSID("$OpenBSD: scp.c,v 1.91 2002/06/19 00:27:55 deraadt Exp $");
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "xmalloc.h"
#include "atomicio.h"
#include "pathnames.h"
@@ -1263,7 +1261,7 @@ progressmeter(int flag)
}
i = 0;
abbrevsize = cursize;
- while (abbrevsize >= 100000 && i < sizeof (prefixes)) {
+ while (abbrevsize >= 100000 && i < strlen(prefixes) - 1) {
i++;
abbrevsize >>= 10;
}