Browse Source

Fix: CVE-2020-6061/TALOS-2020-0984

Mészáros Mihály 5 years ago
parent
commit
51a7c2b9bf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/apps/relay/http_server.c

+ 1 - 1
src/apps/relay/http_server.c

@@ -103,7 +103,7 @@ const char* get_http_date_header()
 
 static struct headers_list * post_parse(char *data, size_t data_len)
 {
-	while((*data=='\r')||(*data=='\n')) ++data;
+	while((*data=='\r')||(*data=='\n')) { ++data; --data_len; }
 	char *post_data = (char*)calloc(data_len + 1, sizeof(char));
 	memcpy(post_data, data, data_len);
 	char *fmarker = NULL;