From 68e0c1f280ef7c1a7f0d4d05feb5a7438f82971a Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Wed, 14 Aug 2024 13:19:13 +0200 Subject: Fix SonarCloud complaint. Signed-off-by: Toni Uhlig --- dependencies/nDPIsrvd.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dependencies') diff --git a/dependencies/nDPIsrvd.h b/dependencies/nDPIsrvd.h index 486dbaa69..133beff5e 100644 --- a/dependencies/nDPIsrvd.h +++ b/dependencies/nDPIsrvd.h @@ -655,6 +655,11 @@ static inline void nDPIsrvd_socket_free(struct nDPIsrvd_socket ** const sock) static inline int nDPIsrvd_setup_address(struct nDPIsrvd_address * const address, char const * const destination) { + if (address == NULL || destination == NULL) + { + return 1; + } + size_t len = strlen(destination); char const * first_colon = strchr(destination, ':'); char const * last_colon = strrchr(destination, ':'); -- cgit v1.2.3