Mercurial > gnulib
diff lib/regcomp.c @ 17725:d65323023063
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.
author | Jim Meyering <meyering@fb.com> |
---|---|
date | Sat, 12 Jul 2014 16:33:49 -0700 |
parents | 9edabe80a556 |
children | ab58d4870664 |
line wrap: on
line diff