mirror of git://sourceware.org/git/glibc.git
Recognize ill-formed { } expressions in regcomp.
This commit is contained in:
parent
bdc7f5d76b
commit
52db8039f5
|
@ -1,5 +1,8 @@
|
||||||
2009-08-23 Ulrich Drepper <drepper@redhat.com>
|
2009-08-23 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* posix/regcomp.c (parse_dup_op): Verify the expression is correctly
|
||||||
|
terminated.
|
||||||
|
|
||||||
* posix/unistd.h: Define _POSIX_VERSION and _POSIX2_* correctly if
|
* posix/unistd.h: Define _POSIX_VERSION and _POSIX2_* correctly if
|
||||||
older POSIX versions are selected.
|
older POSIX versions are selected.
|
||||||
|
|
||||||
|
|
|
@ -2481,7 +2481,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
|
||||||
return elem;
|
return elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BE (end != -1 && start > end, 0))
|
if (BE ((end != -1 && start > end) || token->type != OP_CLOSE_DUP_NUM, 0))
|
||||||
{
|
{
|
||||||
/* First number greater than second. */
|
/* First number greater than second. */
|
||||||
*err = REG_BADBR;
|
*err = REG_BADBR;
|
||||||
|
|
Loading…
Reference in New Issue