diff options
| author | Huie-Ying Lee <Huie-Ying.Lee@Sun.COM> | 2009-03-27 09:52:26 -0700 | 
|---|---|---|
| committer | Huie-Ying Lee <Huie-Ying.Lee@Sun.COM> | 2009-03-27 09:52:26 -0700 | 
| commit | 6c91005f7886574b2d73e4d16fc2ee54833bfd69 (patch) | |
| tree | b93824e32a01a3086c0dbd99123534b47738eb46 /usr/src/cmd/ssh/scp/scp.c | |
| parent | 0fd2682eef78b1fd2fbb5d69ccc03968820967ae (diff) | |
| download | illumos-joyent-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.c | 6 | 
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;  	} | 
