From 2ab0433aca70bf591941df946f7605306bd0d407 Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 31 Oct 2019 09:31:26 +0100 Subject: Updated content-type parsing --- src/lib/ndpi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 7a2d5a01e..e71ca668e 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -5096,10 +5096,10 @@ void ndpi_parse_packet_line_info(struct ndpi_detection_module_struct *ndpi_str, int i; for(i=0; separator[i] != '\0'; i++) { - char *c = strchr((char*)packet->content_line.ptr, separator[i]); + char *c = memchr((char*)packet->content_line.ptr, separator[i], packet->content_line.len); if(c != NULL) - packet->content_line.len = c - (char*)packet->content_line.ptr; + packet->content_line.len = c - (char*)packet->content_line.ptr; } } -- cgit v1.2.3