Avoid a NULL dereference when serving a request for the base url of a static content sub tree.
This commit is contained in:
parent
741a4aa55f
commit
387626e6ef
1 changed files with 3 additions and 0 deletions
|
@ -87,6 +87,9 @@ page_static_file(http_connection_t *hc, const char *remain, void *opaque)
|
|||
struct stat st;
|
||||
const char *content = NULL, *postfix;
|
||||
|
||||
if(remain == NULL)
|
||||
return 404;
|
||||
|
||||
if(strstr(remain, ".."))
|
||||
return HTTP_STATUS_BAD_REQUEST;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue