Subject: Re: bin/31068: whatis doesn't find /bin/[
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: netbsd-bugs
Date: 08/25/2005 11:47:02
The following reply was made to PR bin/31068; it has been noted by GNATS.

From: Jukka Salmi <j+nbsd@2005.salmi.ch>
To: gnats-bugs@netbsd.org
Cc: zafer@gmx.org
Subject: Re: bin/31068: whatis doesn't find /bin/[
Date: Thu, 25 Aug 2005 13:46:25 +0200

 --qlTNgmc+xy1dBmNv
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 zafer@gmx.org wrote:
 > >Number:         31068
 > >Category:       bin
 > >Synopsis:       whatis doesn't find /bin/[
 
 The attached patch should fix the problem.
 
 Cheers, Jukka
 
 -- 
 bashian roulette:
 $ ((RANDOM%6)) || rm -rf ~
 
 --qlTNgmc+xy1dBmNv
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="whatis.patch"
 
 Index: usr.bin/whatis/whatis.c
 ===================================================================
 RCS file: /cvsroot/src/usr.bin/whatis/whatis.c,v
 retrieving revision 1.19
 diff -u -p -r1.19 whatis.c
 --- usr.bin/whatis/whatis.c	5 Nov 2004 19:54:47 -0000	1.19
 +++ usr.bin/whatis/whatis.c	25 Aug 2005 11:44:01 -0000
 @@ -201,7 +201,7 @@ match(bp, str)
  	if (!*str || !*bp)
  		return(0);
  	for (len = strlen(str);;) {
 -		for (; *bp && !isalnum((unsigned char)*bp); ++bp);
 +		for (; *bp && *bp != '[' && !isalnum((unsigned char)*bp); ++bp);
  		if (!*bp)
  			break;
  		for (start = bp++;
 
 --qlTNgmc+xy1dBmNv--