httpd: check that file data is present when dynamic read is disabled

Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
goldsimon 2018-02-02 21:31:36 +01:00
parent 23c933fd16
commit d5d30d49f2

View File

@ -2276,6 +2276,11 @@ http_init_file(struct http_state *hs, struct fs_file *file, int is_09, const cha
{
if (file != NULL) {
/* file opened, initialise struct http_state */
#if !LWIP_HTTPD_DYNAMIC_FILE_READ
/* If dynamic read is disabled, file data must be in one piece and available now */
LWIP_ASSERT("file->data != NULL", file->data != NULL);
#endif
#if LWIP_HTTPD_SSI
if (tag_check) {
struct http_ssi_state *ssi = http_ssi_state_alloc();