aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/strings
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-03-29 13:18:16 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-03-29 13:18:16 +0000
commit31f9b07613779647899dfb576515a084b465004d (patch)
treeebeab0b64b62bf7771c2f7c697d5ce5c65efbcda /usr.bin/strings
parent350fcdb83402d521b24d5797f97e3ed8f1a59904 (diff)
Notes
Diffstat (limited to 'usr.bin/strings')
-rw-r--r--usr.bin/strings/strings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/strings/strings.c b/usr.bin/strings/strings.c
index 663d73de50a3..80011677c3f5 100644
--- a/usr.bin/strings/strings.c
+++ b/usr.bin/strings/strings.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)strings.c 8.2 (Berkeley) 1/28/94";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: strings.c,v 1.6 1997/08/11 07:31:28 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -137,7 +137,7 @@ main(argc, argv)
else if (minlen < 1)
errx(1, "length less than 1");
- if (!(bfr = malloc((u_int)minlen)))
+ if (!(bfr = malloc((u_int)minlen + 1)))
errx(1, "malloc");
bfr[minlen] = '\0';
file = "stdin";