[Toybox] grep doesn't allocate enough space
William Haddon
william at haddonthethird.net
Tue Oct 22 07:46:33 PDT 2013
That was -E not -e.
On 10/21/2013 05:10:32 PM, William Haddon wrote:
> 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. I've
> included the patch to fix it below.
1382453193.0
More information about the Toybox
mailing list