diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2024-08-14 13:19:13 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2024-08-16 13:19:13 +0200 |
commit | 68e0c1f280ef7c1a7f0d4d05feb5a7438f82971a (patch) | |
tree | 94679bf3e3708f1bc63b8abe143ccb1a147a5e26 | |
parent | 8271f15e25a0f803e4c101dae0b46e7bae021147 (diff) |
Fix SonarCloud complaint.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r-- | dependencies/nDPIsrvd.h | 5 |
1 files changed, 5 insertions, 0 deletions
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, ':'); |