diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-30 20:47:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-30 20:47:16 +0000 |
commit | a8b5c4b7bfd41321a0f012f32365c414ce723c16 (patch) | |
tree | 25e187e658fa558bc02ca0d4cd23aee55d12eab6 /usr.bin/size | |
parent | 5d562d3ced01ca134e81e44376d5cc2a37ef0ca3 (diff) |
knf
Diffstat (limited to 'usr.bin/size')
-rw-r--r-- | usr.bin/size/size.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/size/size.c b/usr.bin/size/size.c index 433426200d2..8b952e8b51e 100644 --- a/usr.bin/size/size.c +++ b/usr.bin/size/size.c @@ -1,4 +1,4 @@ -/* $OpenBSD: size.c,v 1.14 2002/02/16 21:27:52 millert Exp $ */ +/* $OpenBSD: size.c,v 1.15 2003/03/30 20:47:15 deraadt Exp $ */ /* $NetBSD: size.c,v 1.7 1996/01/14 23:07:12 pk Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)size.c 8.2 (Berkeley) 12/9/93"; #endif -static char rcsid[] = "$OpenBSD: size.c,v 1.14 2002/02/16 21:27:52 millert Exp $"; +static char rcsid[] = "$OpenBSD: size.c,v 1.15 2003/03/30 20:47:15 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -210,12 +210,12 @@ show_archive(count, fname, fp) * BSD 4.4 extended AR format: #1/<namelen>, with name as the * first <namelen> bytes of the file */ - if ( (ar_head.ar_name[0] == '#') && - (ar_head.ar_name[1] == '1') && - (ar_head.ar_name[2] == '/') && - (isdigit(ar_head.ar_name[3]))) { - + if ((ar_head.ar_name[0] == '#') && + (ar_head.ar_name[1] == '1') && + (ar_head.ar_name[2] == '/') && + (isdigit(ar_head.ar_name[3]))) { int len = atoi(&ar_head.ar_name[3]); + if (len > namelen) { p -= (long)name; if ((name = realloc(name, baselen+len)) == NULL) |