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

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

GNU grep 2.5 bug


From: Garrett Comeaux
Subject: GNU grep 2.5 bug
Date: Thu, 01 Jul 2004 14:02:07 -0500
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040116

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I believe I've found a bug in GNU grep 2.5.  The bug is visible
when the -i and -f options are used together:
grep -i -f /usr/local/etc/logcheck.violations

I'm using the actual logcheck packages logcheck.violations file,
and I noticed that way too many matches were coming back.  I then
used the color option to highlight exactly what was being matched.
Not every line had a colored match, so I used the -o option. Here's
what I saw:

grep -i -f /usr/.../logcheck.violations /var/adm/messages | wc -l
433
grep -o -i -f /usr/.../logcheck.violations /var/adm/messages | wc -l
28

I fixed the problem by changing the EGexecute function in search.c.

I changed

~  /* Successful, no backreferences encountered! */
          if (!backref)
            goto success;

to

~  /* Successful, no backreferences encountered! */
~       /*
          if (!backref)
            goto success;
~        */

Just commenting out this goto fixed what I was seeing, but I don't
know if it caused any other problems.


Hope this helps.

Garrett
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (SunOS)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA5F+tv6tVoN/jYfYRAk24AJ9ythAMSRsXy84VRImsmAI5X0ifkACgpD2/
4ivECJojei1GRUWHCjrm3Yw=
=+4pT
-----END PGP SIGNATURE-----
!=
-ERR Password
ATTACK
BAD
CWD etc
DEBUG
EXPN
FAILURE
ILLEGAL
LOGIN FAILURE
LOGIN REFUSED
PERMITTED
REFUSED
RETR group
RETR passwd
RETR pwd.db
ROOT LOGIN
SITE EXEC
VRFY
"WIZ"
admin 
alias database
denied
deny
deny host
expn
failed
illegal
nested
permitted
reject
rexec
rshd
securityalert
setsender
shutdown
smrsh
su root
su:
sucked
unapproved
vrfy
attackalert

reply via email to

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