@cryptotaxi247 / netdata-1 / commits / c6083cc97

Fix a buffer overflow when extracting information from a STREAM connection (#10391)

Stelios Fragkakis committed Dec 15, 2020 at 14:36 UTC c6083cc97cea09ce692fd32903b72fb32885f565
1 file changed +1 -1
web/server/web_client.c
+1 -1
@@ -864,7 +864,7 @@ static inline char *web_client_valid_method(struct web_client *w, char *s) {
864 copyme += 9;
865 char *end = strchr(copyme,'&');
866 if(end){
867 - size_t length = end - copyme;
867 + size_t length = MIN(255, end - copyme);
868 memcpy(hostname,copyme,length);
869 hostname[length] = 0X00;
870 }