(parse_dup_op): Fail with REG_BADBR is first number in {,} expression is larger.

This commit is contained in:
Ulrich Drepper 2003-11-13 17:25:46 +00:00
parent b27eea96b9
commit deeb4aae69
1 changed files with 6 additions and 0 deletions

View File

@ -2412,6 +2412,12 @@ parse_dup_op (dup_elem, regexp, dfa, token, syntax, err)
goto parse_dup_op_espace;
}
}
else if (BE (start > end, 0))
{
/* First number greater than first. */
*err = REG_BADBR;
return NULL;
}
else if (end - start > 0)
{
/* Then extract "<re>{0,m}" to "<re>?<re>?...<re>?". */