fix again for garbage input

This commit is contained in:
Andrew Pamment 2018-01-25 20:34:26 +10:00
parent 7d0c55885c
commit 133555c1d1

View File

@ -422,6 +422,8 @@ int www_handler(void * cls, struct MHD_Connection * connection, const char * url
char *endptr; char *endptr;
// char *static_buffer; // char *static_buffer;
page = NULL;
if (strcmp(method, "GET") == 0) { if (strcmp(method, "GET") == 0) {
if (*ptr == NULL) { if (*ptr == NULL) {
con_inf = (struct connection_info_s *)malloc(sizeof(struct connection_info_s)); con_inf = (struct connection_info_s *)malloc(sizeof(struct connection_info_s));