bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep: problem with invalid argument to --context


From: Alain Magloire
Subject: Re: grep: problem with invalid argument to --context
Date: Sun, 29 Jul 2001 10:52:31 -0400 (EDT)

Bonjour Daniel

> 
> When working with the swedish transaltion of grep i stumbled across this:
> 
> An obvious fix to an obvious problem in grep-2.5e.
> 
> Problem:
> 
> when grep is called with --context=NON-NUMERIC a simple bug in the
> parametrs to error() causes grep to segfault.

Yes, this was corrected in the repository.
The code is available through
anonymous CVS.
$ cvs -d :pserver:address@hidden:/cvs login
Password: [just hit enter]
$ cvs -d :pserver:address@hidden:/cvs checkout grep


Thanks.

> 
> Fix: 
> 
> diff -ur grep-2.5e.vanilla/src/grep.c grep-2.5e/src/grep.c
> --- grep-2.5e.vanilla/src/grep.c      Sun Mar  4 20:31:00 2001
> +++ grep-2.5e/src/grep.c      Sat Jul 28 19:30:10 2001
> @@ -188,7 +188,7 @@
>        && 0 <= (*out = value)
>        && *out == value))
>      {
> -      error (2, 0, "%s: %s: %s\n", str, _("invalid context length 
> argument"));
> +      error (2, 0, "%s: %s", str, _("invalid context length argument"));
>      }
>  }
>  
> 
> cheers
> /daniel
> 
> -- 
> begin:vcard fn:Daniel Resare tel;cell:+46739442044 tel;work:+468332040
> adr;work:Scheelegatan 36; 112 28; Stockholm; Sweden end:vcard
> pgp fingerprint: 8D97 F297 CA0D 8751 D8EB  12B6 6EA6 727F 9B8D EC2A
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]