Fix overrun in url rewrites, add tests

PUBLISHED_FROM=03dc62aa69dddcbe41d5bc5c014de248332da918
This commit is contained in:
Deomid Ryabkov authored and Cesanta Bot committed 2016-08-09 10:06:12 +00:00
1 parent af98854ce4
commit 1070dd2d87
1 file changed
+1
+1
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 {