fix segment fault cause by the ssl.server_names when it may NULL

This commit is contained in:
ysk
2020-06-03 11:19:37 +08:00
parent 52893d99f6
commit 40550073ef
+4
View File
@@ -131,6 +131,10 @@ void *ndpi_realloc(void *ptr, size_t old_size, size_t new_size) {
/* ****************************************** */
char *ndpi_strdup(const char *s) {
if( s == NULL ){
return NULL;
}
int len = strlen(s);
char *m = ndpi_malloc(len + 1);