[PATCH] uhttpd/file: fix string out of buffer range on uh_defer_script

2023-04-23 Thread Liangbin Lian
if a url path length is multiple of 8, tailing zero will be trimed out on uh_defer_script, cause a strangle error. it's simple to reproduce. 1. create a luci controller, register a entry with path length multiple of 8 (including '/cgi-bin/'), for example, '/cgi-bin/luci/admin/system/admin'. 2. s

[PATCH] uhttpd/file: fix string out of buffer range on uh_defer_script

2023-04-23 Thread Liangbin Lian
if a url path length is multiple of 4, tailing zero will be trimed out on uh_defer_script, cause a strangle error. it's simple to reproduce. 1. create a luci controller, register a entry with path length multiple of 4 (including '/cgi-bin/'), for example, '/cgi-bin/luci/admin/system/admin'. 2. s