]> Savannah Git Hosting - gnulib.git/commit
regex: don't deref NULL upon heap allocation failure
authorJim Meyering <meyering@fb.com>
Sat, 12 Jul 2014 23:33:49 +0000 (16:33 -0700)
committerJim Meyering <meyering@fb.com>
Sat, 12 Jul 2014 23:44:12 +0000 (16:44 -0700)
commit1051177e3c202667889628fd73aee7c3b470f99d
tree2fbc0df7f06678e9559f9490358296fcd568bd0d
parent4044ca9a9c317335c0f730e9417e57343029d3c4
regex: don't deref NULL upon heap allocation failure

* lib/regcomp.c (parse_dup_op): Handle duplicate_tree
failure in one more place.
To trigger the segfault, configure grep -with-included-regex,
build it, and run these commands:
( ulimit -v 300000; echo a|src/grep -E a+++++++++++++++++++++ )
I discovered this while replying to a private report from
Jens Schleusener about excessive memory consumption by grep
when using a regular expression like the one above.
ChangeLog
lib/regcomp.c