freebsd-dev/usr.bin/grep/regex
Dimitry Andric 00f060000f Fix a segfault in bsdgrep when parsing the invalid extended regexps "?"
or "+" (these are invalid, because there is no preceding operand).

When bsdgrep attempts to emulate GNU grep in discarding and ignoring the
invalid ? or + operators, some later logic in tre_compile_fast() goes
beyond the end of the buffer, leading to a crash.

Fix this by bailing out, and reporting a bad pattern instead.

Reported by:	Steve Kargl
MFC after:	1 week
2016-08-02 20:25:22 +00:00
..
fastmatch.c
fastmatch.h
glue.h Fix a bug in bsdgrep that caused the program to hang in a tight loop for 2016-03-13 14:53:12 +00:00
hashtable.c
hashtable.h
tre-compile.c
tre-fastmatch.c Fix a segfault in bsdgrep when parsing the invalid extended regexps "?" 2016-08-02 20:25:22 +00:00
tre-fastmatch.h
xmalloc.c
xmalloc.h