diff options
Diffstat (limited to 'httpd/patterns.c')
-rw-r--r-- | httpd/patterns.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/httpd/patterns.c b/httpd/patterns.c index b7cb381..23c7083 100644 --- a/httpd/patterns.c +++ b/httpd/patterns.c @@ -291,6 +291,8 @@ end_capture(struct match_state *ms, const char *s, const char *p) { int l = capture_to_close(ms); const char *res; + if (l == -1) + return NULL; /* close capture */ ms->capture[l].len = s - ms->capture[l].init; /* undo capture if match failed */ |