mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-11 07:40:05 +00:00
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+++++++++++++++++++++ )
This commit is contained in:
parent
9d39d517a7
commit
7ee03f0018
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2014-07-13 Jim Meyering <meyering@fb.com>
|
||||
|
||||
[BZ 17150]
|
||||
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+++++++++++++++++++++ )
|
||||
|
||||
2014-07-13 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update.
|
||||
|
@ -2582,6 +2582,8 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
|
||||
|
||||
/* Duplicate ELEM before it is marked optional. */
|
||||
elem = duplicate_tree (elem, dfa);
|
||||
if (BE (elem == NULL, 0))
|
||||
goto parse_dup_op_espace;
|
||||
old_tree = tree;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user