Skip to content

Commit

Permalink
Explicit cast Referer / Host line to the type ndpi_strnstr(...) exp…
Browse files Browse the repository at this point in the history
…ects (unsigned char -> char)

Signed-off-by: Toni Uhlig <[email protected]>
  • Loading branch information
utoni committed Jan 25, 2025
1 parent dac31d8 commit e946f49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/protocols/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e946f49

Please sign in to comment.