regex: don't deref NULL upon heap allocation failure
authorJim Meyering <meyering@fb.com>
Sun, 13 Jul 2014 00:07:21 +0000 (17:07 -0700)
committerJim Meyering <meyering@fb.com>
Mon, 14 Jul 2014 04:25:22 +0000 (21:25 -0700)
commit7ee03f00188723a4de2b85021e511ced6d7fc4be
treeb0f6e6b2f903f0da5cc7e3fa9f8c2b5d36ae9548
parent9d39d517a7c700d53e2f24e8855a9b3a5e046a63
regex: don't deref NULL upon heap allocation failure

* posix/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+++++++++++++++++++++ )
ChangeLog
posix/regcomp.c