Merge pull request #913 from yskcg/fix_segment_fault_dev

Fix segment fault dev
This commit is contained in:
Luca Deri
2020-06-05 16:57:46 +02:00
committed by GitHub
3 changed files with 16 additions and 4 deletions
+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);