diff options
author | William Haddon <william@haddonthethird.net> | 2013-11-09 19:37:41 -0600 |
---|---|---|
committer | William Haddon <william@haddonthethird.net> | 2013-11-09 19:37:41 -0600 |
commit | 3ad73e1344afa7812671d08456591b8cde952775 (patch) | |
tree | 7b9ef2059e453b639dde51f704ed754a045b2177 /kconfig/expr.c | |
parent | aa2b8abf8efff6da663382735faf519c131d5a68 (diff) | |
download | toybox-3ad73e1344afa7812671d08456591b8cde952775.tar.gz |
grep doesn't allocate enough space
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.
Diffstat (limited to 'kconfig/expr.c')
0 files changed, 0 insertions, 0 deletions