Avoid a NULL dereference when serving a request for the base url of a static content sub tree.

This commit is contained in:
Andreas Öman 2009-07-11 18:59:48 +00:00
parent 741a4aa55f
commit 387626e6ef

View file

@ -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;