freebsd-dev/usr.bin/grep
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
..
nls
regex Fix a segfault in bsdgrep when parsing the invalid extended regexps "?" 2016-08-02 20:25:22 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
file.c Fix xz handling for files larger than 32K. 2015-01-21 01:11:37 +00:00
grep.1
grep.c Remove usage of _WITH_GETLINE from usr.bin 2016-07-30 01:07:47 +00:00
grep.h
Makefile Bump GCC max-inline-insns-single in libiconv_modules and grep 2015-07-26 00:11:04 +00:00
Makefile.depend new depends 2015-06-16 23:37:19 +00:00
queue.c grep: fix some memory leaks. 2014-07-17 15:59:13 +00:00
util.c Call basename() in a portable way. 2016-07-28 15:19:47 +00:00