aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Marie <semarie@users.noreply.github.com>2015-06-21 06:57:58 +0200
committerSébastien Marie <semarie@users.noreply.github.com>2015-06-21 06:57:58 +0200
commitdf6d58c8a50cc5d11d3b16986c5ff8ec8cea09b6 (patch)
tree7f836df30d97ccd621ebd53884d7f4d2b57bb25d
parent1de57f991a98d99872c5edb5200ca8309126187d (diff)
downloadhttpd-df6d58c8a50cc5d11d3b16986c5ff8ec8cea09b6.tar.gz
httpd-df6d58c8a50cc5d11d3b16986c5ff8ec8cea09b6.zip
propagate error from classend()
an error could be setted in classend(). check and propagate it if any.
-rw-r--r--httpd/patterns.c4
1 files changed, 4 insertions, 0 deletions
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)) {