From df6d58c8a50cc5d11d3b16986c5ff8ec8cea09b6 Mon Sep 17 00:00:00 2001 From: Sébastien Marie Date: Sun, 21 Jun 2015 06:57:58 +0200 Subject: propagate error from classend() an error could be setted in classend(). check and propagate it if any. --- httpd/patterns.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/httpd/patterns.c b/httpd/patterns.c index f4b999d..8fbaa28 100644 --- a/httpd/patterns.c +++ b/httpd/patterns.c @@ -375,6 +375,8 @@ match(struct match_state *ms, const char *s, const char *p) } /* points to what is next */ ep = classend(ms, p); + if (ms->error != NULL) + break; previous = (s == ms->src_init) ? '\0' : *(s - 1); if (!matchbracketclass(uchar(previous), @@ -416,6 +418,8 @@ match(struct match_state *ms, const char *s, const char *p) dflt: /* points to optional suffix */ ep = classend(ms, p); + if (ms->error != NULL) + break; /* does not match at least once? */ if (!singlematch(ms, s, p, ep)) { -- cgit v1.2.3-54-g00ecf