From e946f49aca13e4447a7d7b2acae6323a4531fb55 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sat, 25 Jan 2025 05:36:07 +0100 Subject: [PATCH] Explicit cast Referer / Host line to the type `ndpi_strnstr(...)` expects (unsigned char -> char) Signed-off-by: Toni Uhlig --- src/lib/protocols/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index 9064f7282a7..5c611d8d883 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -1063,10 +1063,10 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ } if((packet->referer_line.ptr != NULL) && (flow->http.referer == NULL)) - flow->http.referer = ndpi_strndup(packet->referer_line.ptr, packet->referer_line.len); + flow->http.referer = ndpi_strndup((const char *)packet->referer_line.ptr, packet->referer_line.len); if((packet->host_line.ptr != NULL) && (flow->http.host == NULL)) - flow->http.host = ndpi_strndup(packet->host_line.ptr, packet->host_line.len); + flow->http.host = ndpi_strndup((const char *)packet->host_line.ptr, packet->host_line.len); if(packet->content_line.ptr != NULL) { NDPI_LOG_DBG2(ndpi_struct, "Content Type line found %.*s\n",