mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
fix * at the start of a BRE subexpression
commit 7eaa76fc2e
made * invalid at
the start of a BRE subexpression, but it should be accepted as
literal * there according to the standard.
This patch does not fix subexpressions starting with ^*.
This commit is contained in:
parent
6e694d6960
commit
39ea71fb8a
1 changed files with 0 additions and 4 deletions
|
@ -889,7 +889,6 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, const char *s)
|
|||
s++;
|
||||
break;
|
||||
case '*':
|
||||
return REG_BADPAT;
|
||||
case '{':
|
||||
case '+':
|
||||
case '?':
|
||||
|
@ -978,9 +977,6 @@ static reg_errcode_t tre_parse(tre_parse_ctx_t *ctx)
|
|||
}
|
||||
|
||||
parse_iter:
|
||||
/* extension: repetitions are rejected after an empty node
|
||||
eg. (+), |*, {2}, but assertions are not treated as empty
|
||||
so ^* or $? are accepted currently. */
|
||||
for (;;) {
|
||||
int min, max;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue