summaryrefslogtreecommitdiff
path: root/src/mod_redirect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_redirect.c')
-rw-r--r--src/mod_redirect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_redirect.c b/src/mod_redirect.c
index 7a0f82a..976d845 100644
--- a/src/mod_redirect.c
+++ b/src/mod_redirect.c
@@ -210,7 +210,7 @@ static handler_t mod_redirect_uri_handler(server *srv, connection *con, void *p_
buffer_reset(p->location);
start = 0;
- for (k = 0; k < pattern_len; k++) {
+ for (k = 0; k + 1 < pattern_len; k++) {
if (pattern[k] == '$' || pattern[k] == '%') {
/* got one */