mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix a bug in bsdgrep(1) where patterns are not correctly
detected. Certain criteria must be met for this bug to show up: * the -w flag is specified, and * neither -o or --color are specified, and * the pattern is part of another word in the line, and * the other word that contains the pattern occurs first PR: 181973 MFC after: 3 days Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
fc39ce9ee1
commit
66edec08b0
1 changed files with 1 additions and 1 deletions
|
|
@ -336,7 +336,7 @@ procline(struct str *l, int nottext)
|
|||
}
|
||||
|
||||
/* One pass if we are not recording matches */
|
||||
if ((color == NULL && !oflag) || qflag || lflag)
|
||||
if (!wflag && ((color == NULL && !oflag) || qflag || lflag))
|
||||
break;
|
||||
|
||||
if (st == (size_t)pmatch.rm_so)
|
||||
|
|
|
|||
Loading…
Reference in a new issue