diff options
-rw-r--r-- | src/lib/ndpi_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 38820dc0a..7880aeae3 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -9105,6 +9105,9 @@ char *ndpi_user_agent_set(struct ndpi_flow_struct *flow, /* Already set: ignore double set */ return NULL; } + if(value_len == 0) { + return NULL; + } flow->http.user_agent = ndpi_malloc(value_len + 1); if(flow->http.user_agent != NULL) { |