Add clang-tidy target and fix problems

This commit is contained in:
Tobias Reisinger 2020-11-13 02:06:48 +01:00
parent fca35ade9e
commit f97b149376
25 changed files with 199 additions and 115 deletions
src/handlers

View file

@ -1,3 +1,4 @@
#include <bsd/string.h>
#include <string.h>
#include <status.h>
@ -21,7 +22,7 @@ add_extra_headers(char *extra_headers)
if(extra_headers == NULL)
{
result = malloc(sizeof(char) * (std_headers_len + 1));
strcpy(result, global_config->http_server_opts.extra_headers);
strlcpy(result, global_config->http_server_opts.extra_headers, std_headers_len + 1);
return result;
}