Fix overrun in url rewrites, add tests

PUBLISHED_FROM=03dc62aa69dddcbe41d5bc5c014de248332da918
This commit is contained in:
Deomid Ryabkov 2016-08-09 13:02:29 +03:00 committed by Cesanta Bot
parent af98854ce4
commit 1070dd2d87

View File

@ -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 {