diff options
Diffstat (limited to 'src/lib/ndpi_domains.c')
-rw-r--r-- | src/lib/ndpi_domains.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ndpi_domains.c b/src/lib/ndpi_domains.c index aeb34b010..ff7fd52cb 100644 --- a/src/lib/ndpi_domains.c +++ b/src/lib/ndpi_domains.c @@ -82,6 +82,8 @@ int ndpi_load_domain_suffixes(struct ndpi_detection_module_struct *ndpi_str, const char* ndpi_get_host_domain_suffix(struct ndpi_detection_module_struct *ndpi_str, const char *hostname) { + if(!ndpi_str) + return NULL; if(ndpi_str->public_domain_suffixes == NULL) return(hostname); else { @@ -96,6 +98,8 @@ const char* ndpi_get_host_domain_suffix(struct ndpi_detection_module_struct *ndp const char* ndpi_get_host_domain(struct ndpi_detection_module_struct *ndpi_str, const char *hostname) { + if(!ndpi_str) + return NULL; if(ndpi_str->public_domain_suffixes == NULL) return(hostname); else { |