aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/grep.c
AgeCommit message (Collapse)Author
2013-12-27Pass through all the readfile() arguments from xreadfile().Rob Landley
2013-11-09grep doesn't allocate enough spaceWilliam Haddon
Grep miscalculates the amount of memory it needs to allocate when "converting strings to one big regex" when the -e flag is not specified. Since in this case "\|" is inserted between strings rather than "|", two extra bytes rather than one need to be provided for each string. I noticed this because it caused grep to seg-fault on musl when a regex of exactly seven characters is provided.
2013-08-21Fix bug where exit code was only correct for -q.Rob Landley
2013-08-19Move grep from pending to posix, switch default to y.Rob Landley