aboutsummaryrefslogtreecommitdiff
path: root/httpd/patterns.c
diff options
context:
space:
mode:
Diffstat (limited to 'httpd/patterns.c')
-rw-r--r--httpd/patterns.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/httpd/patterns.c b/httpd/patterns.c
index 1dbea15..177a5af 100644
--- a/httpd/patterns.c
+++ b/httpd/patterns.c
@@ -427,9 +427,12 @@ match(struct match_state *ms, const char *s, const char *p)
if (!singlematch(ms, s, p, ep)) {
/* accept empty? */
if (*ep == '*' || *ep == '?' || *ep == '-') {
- p = ep + 1;
/* return match(ms, s, ep + 1); */
- goto init;
+ return match(ms, s, ep + 1);
+ /*
+ * p = ep + 1;
+ * goto init;
+ */
} else {
/* '+' or no suffix */
s = NULL; /* fail */
@@ -621,11 +624,13 @@ str_find_aux(struct match_state *ms, const char *pattern, const char *string,
do {
const char *res;
ms->level = 0;
- assert(ms->matchdepth == MAXCCALLS);
if ((res = match(ms, s1, p)) != NULL) {
sm->sm_so = 0;
sm->sm_eo = ls;
return push_captures(ms, s1, res, sm + 1, nsm - 1) + 1;
+
+ } else if (ms->error != NULL) {
+ return 0;
}
} while (s1++ < ms->src_end && !anchor);