From 01c290e5097991e11a896399b4e2587cf540743a Mon Sep 17 00:00:00 2001 From: liuwentan Date: Sun, 8 Oct 2023 15:45:43 +0800 Subject: [PATCH] [BUGFIX]fix null pointer --- src/maat_ipport_plugin.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/maat_ipport_plugin.c b/src/maat_ipport_plugin.c index bc8efd2..c96d1bc 100644 --- a/src/maat_ipport_plugin.c +++ b/src/maat_ipport_plugin.c @@ -553,6 +553,10 @@ struct ex_data_runtime *ipport_plugin_runtime_get_ex_data_rt(void *ipport_plugin static int validate_port(struct ipport_item *item, uint16_t port) { + if (NULL == item) { + return -1; + } + uint16_t host_port = ntohs(port); if (item->min_port > host_port || item->max_port < host_port) {