[BUGFIX]fix null pointer

This commit is contained in:
liuwentan
2023-10-08 15:45:43 +08:00
parent 7cf9a79d64
commit 01c290e509

View File

@@ -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) {