From 773e9b817019e6e79f6701667026092051d3390e Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Tue, 31 Oct 2023 15:48:06 +0100 Subject: [PATCH] Added pointer check --- src/lib/ndpi_utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 645dfc12a81..fccc9459c81 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -1733,9 +1733,12 @@ static void ndpi_compile_rce_regex() { #endif } - ndpi_free((void *)pcreErrorStr); + if(pcreErrorStr != NULL) + ndpi_free((void *)pcreErrorStr); } +/* ********************************** */ + static int ndpi_is_rce_injection(char* query) { if(!initialized_comp_rx) { ndpi_compile_rce_regex();