From a8c6dbca849995dc95f80203572c3d85100c6892 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Wed, 15 Feb 1995 02:47:47 +0000 Subject: >Description: The "strings" program chokes if you try using "-n". >How-To-Repeat: Try "strings -n SOMENUMBER SOMEFILE". >Fix: Here's a "diff -u" patch that corrects the problem. Submitted by: Lon Willett via NetBSD --- usr.bin/strings/strings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/strings/strings.c') diff --git a/usr.bin/strings/strings.c b/usr.bin/strings/strings.c index 398ccacdab39..435e13412f40 100644 --- a/usr.bin/strings/strings.c +++ b/usr.bin/strings/strings.c @@ -123,7 +123,7 @@ main(argc, argv) if (minlen == -1) minlen = DEF_LEN; - else { + else if (minlen < 1) { (void)fprintf(stderr, "strings: length less than 1\n"); exit (1); } -- cgit v1.3