|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../musl/0002-fix-at-the-start-of-a-BRE-subexpression.patch # Copyright (C) 2016 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END ---
From 39ea71fb8afddda879a1999f2a203dfdaf57a639 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy <nsz@port70.net> Date: Mon, 29 Feb 2016 15:04:46 +0000 Subject: [PATCH] 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 ^*. ---
src/regex/regcomp.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
index da6abd1..7a2864c 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; --
2.7.2
|