summaryrefslogtreecommitdiff
path: root/src/regex
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2016-02-29 15:04:46 +0000
committerRich Felker <dalias@aerifal.cx>2016-03-02 00:47:19 -0500
commit39ea71fb8afddda879a1999f2a203dfdaf57a639 (patch)
treec87a9dc81a2cdac4f483b2b42d7ba7422185a544 /src/regex
parent6e694d6960d9d50a119e8660c95bf9308e609053 (diff)
downloadmusl-39ea71fb8afddda879a1999f2a203dfdaf57a639.tar.gz
musl-39ea71fb8afddda879a1999f2a203dfdaf57a639.tar.bz2
musl-39ea71fb8afddda879a1999f2a203dfdaf57a639.tar.xz
musl-39ea71fb8afddda879a1999f2a203dfdaf57a639.zip
fix * at the start of a BRE subexpression
commit 7eaa76fc2e7993582989d3838b1ac32dd8abac09 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 ^*.
Diffstat (limited to 'src/regex')
-rw-r--r--src/regex/regcomp.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
index da6abd18..7a2864cd 100644
--- a/src/regex/regcomp.c
+++ b/src/regex/regcomp.c
@@ -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;