mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 12:13:47 +00:00
httpd: fix missing null termination when searching for a default file in file system folder
This commit is contained in:
parent
a26a2e1340
commit
eb91fdd861
@ -2198,6 +2198,7 @@ http_find_file(struct http_state *hs, const char *uri, int is_09)
|
||||
size_t name_len = strlen(httpd_default_filenames[loop].name);
|
||||
size_t name_copy_len = LWIP_MIN(len_left, name_len);
|
||||
MEMCPY(&http_uri_buf[copy_len], httpd_default_filenames[loop].name, name_copy_len);
|
||||
http_uri_buf[copy_len + name_copy_len] = 0;
|
||||
}
|
||||
file_name = http_uri_buf;
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user