summaryrefslogtreecommitdiffstats
path: root/src/plugins/http_static/static_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/http_static/static_server.c')
-rw-r--r--src/plugins/http_static/static_server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c
index ef9d3d77e41..73ea8895de3 100644
--- a/src/plugins/http_static/static_server.c
+++ b/src/plugins/http_static/static_server.c
@@ -933,7 +933,7 @@ state_sent_ok (session_t * s, http_session_t * hs,
/* What kind of dog food are we serving? */
suffix = (char *) (hs->path + vec_len (hs->path) - 1);
- while (*suffix != '.')
+ while ((u8 *) suffix >= hs->path && *suffix != '.')
suffix--;
suffix++;
http_type = "text/html";