From 1070dd2d87b2c4c9d1b81f781b19a476895a72ce Mon Sep 17 00:00:00 2001 From: Deomid Ryabkov Date: Tue, 9 Aug 2016 13:02:29 +0300 Subject: [PATCH] Fix overrun in url rewrites, add tests PUBLISHED_FROM=03dc62aa69dddcbe41d5bc5c014de248332da918 --- mongoose.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mongoose.c b/mongoose.c index 9331760b..b3a2bf95 100644 --- a/mongoose.c +++ b/mongoose.c @@ -6410,6 +6410,7 @@ MG_INTERNAL int mg_uri_to_local_path(struct http_message *hm, } if (ok) { *local_path = lp; + if (u > cp_end) u = cp_end; remainder->p = u; remainder->len = cp_end - u; } else {