From miff@spam.apana.org.au  Tue Apr 11 06:21:22 1995
Received: from spam.apana.org.au (spam.apana.org.au [202.0.75.1])
          by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id GAA19526
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Apr 1995 06:20:37 -0700
Received: (from miff@localhost) by spam.apana.org.au (8.6.9/8.6.9) id XAA02102; Tue, 11 Apr 1995 23:40:57 GMT
Message-Id: <199504112340.XAA02102@spam.apana.org.au>
Date: Tue, 11 Apr 1995 23:40:57 GMT
From: miff@spam.apana.org.au
Reply-To: miff@spam.apana.org.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: -n option to strings does not work
X-Send-Pr-Version: 3.2

>Number:         334
>Category:       bin
>Synopsis:       -n option to strings does not work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs (FreeBSD bugs mailing list)
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 11 06:30:00 1995
>Closed-Date:    Tue Apr 11 10:42:26 PDT 1995
>Last-Modified:
>Originator:     michael smith
>Release:        FreeBSD 2.0-RELEASE i386
>Organization:
Genesis Software
>Environment:

Any.

>Description:

The -n number option to /usr/bin/strings is not implemented correctly. Any
attempt to specify a number generates an error.

>How-To-Repeat:

specify the -n option to strings :

# strings -n 10 /kernel |more

>Fix:
	
In /usr/src/usr.bin/strings/strings.c, add the marked lines :

+	if (minlen < 1)
+	{
		if (minlen == -1)
			minlen = DEF_LEN;
		else {
			(void)fprintf(stderr, "strings: length less than 1\n"!);
			exit(1);
		}
+	}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: davidg 
State-Changed-When: Tue Apr 11 10:42:26 PDT 1995 
State-Changed-Why:  
This bug was fixed on 2-2-95. 
>Unformatted:



