Commit 1070dd2d authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Fix overrun in url rewrites, add tests

PUBLISHED_FROM=03dc62aa69dddcbe41d5bc5c014de248332da918
parent af98854c
...@@ -6410,6 +6410,7 @@ MG_INTERNAL int mg_uri_to_local_path(struct http_message *hm, ...@@ -6410,6 +6410,7 @@ MG_INTERNAL int mg_uri_to_local_path(struct http_message *hm,
} }
if (ok) { if (ok) {
*local_path = lp; *local_path = lp;
if (u > cp_end) u = cp_end;
remainder->p = u; remainder->p = u;
remainder->len = cp_end - u; remainder->len = cp_end - u;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment