Skip to content
Snippets Groups Projects
Commit c1b88afe authored by Niclas Finne's avatar Niclas Finne
Browse files

Added safeguard to avoid copying too much data to filename

parent 9ac676c7
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ PT_THREAD(handle_output(struct httpd_state *s))
s->script = NULL;
s->script = httpd_simple_get_script(&s->filename[1]);
if(s->script == NULL) {
strcpy(s->filename, "/notfound.html");
strncpy(s->filename, "/notfound.html", sizeof(s->filename));
PT_WAIT_THREAD(&s->outputpt,
send_headers(s, http_header_404));
PT_WAIT_THREAD(&s->outputpt,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment