From 83600548847515632bbe3b5f3406b721bb1d3dbb Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 22 Mar 2017 22:46:49 +0100 Subject: [PATCH] sanity check hdr_buf size --- src/apps/httpd/makefsdata/makefsdata.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apps/httpd/makefsdata/makefsdata.c b/src/apps/httpd/makefsdata/makefsdata.c index 888c4f06..14d3f411 100644 --- a/src/apps/httpd/makefsdata/makefsdata.c +++ b/src/apps/httpd/makefsdata/makefsdata.c @@ -206,6 +206,8 @@ int main(int argc, char *argv[]) printf(" by Jim Pettinato - circa 2003 " NEWLINE); printf(" extended by Simon Goldschmidt - 2009 " NEWLINE NEWLINE); + LWIP_ASSERT("sizeof(hdr_buf) must fit into an u16_t", sizeof(hdr_buf) <= 0xffff); + strcpy(path, "fs"); for (i = 1; i < argc; i++) { if (argv[i] == NULL) {