diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-06-17 23:53:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-06-17 23:53:17 +0000 |
commit | c115e539e05c4d0c72bf17a2fac55a44e8cad214 (patch) | |
tree | d313455d0805dae0bb4f3b84cd01f34cfd2aa546 /usr.bin/strings/strings.c | |
parent | e15e1120aa721c07312a420969b757d800b57ddc (diff) |
mem underflow
Diffstat (limited to 'usr.bin/strings/strings.c')
-rw-r--r-- | usr.bin/strings/strings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/strings/strings.c b/usr.bin/strings/strings.c index 2053cf3dd69..0b7f788c650 100644 --- a/usr.bin/strings/strings.c +++ b/usr.bin/strings/strings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strings.c,v 1.2 1996/06/26 05:39:30 deraadt Exp $ */ +/* $OpenBSD: strings.c,v 1.3 1997/06/17 23:53:16 deraadt Exp $ */ /* $NetBSD: strings.c,v 1.7 1995/02/15 15:49:19 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)strings.c 8.2 (Berkeley) 1/28/94"; #endif -static char rcsid[] = "$OpenBSD: strings.c,v 1.2 1996/06/26 05:39:30 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: strings.c,v 1.3 1997/06/17 23:53:16 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -159,7 +159,7 @@ main(argc, argv) exit (1); } - if (!(bfr = malloc(minlen))) { + if (!(bfr = malloc(minlen + 1))) { (void)fprintf(stderr, "strings: %s\n", strerror(errno)); exit(1); } |