From f24f68f59d6adf3622dd6f83b94a160f57cf6471 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Thu, 6 Jan 2022 07:15:45 +0100 Subject: Invalid check --- src/lib/protocols/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index d6c77e736..7a6fa1078 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -633,7 +633,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ if(flow->http.nat_ip == NULL) { len = packet->forwarded_line.len; flow->http.nat_ip = ndpi_malloc(len + 1); - if(flow->http.nat_ip == NULL) { + if(flow->http.nat_ip != NULL) { strncpy(flow->http.nat_ip, (char*)packet->forwarded_line.ptr, len); flow->http.nat_ip[len] = '\0'; } -- cgit v1.2.3