Fix some warnings and two errors found while fuzzing (#1844)
Fix CI See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54614
This commit is contained in:
@@ -538,6 +538,12 @@ void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_str,
|
||||
}
|
||||
|
||||
name = ndpi_strdup(protoName);
|
||||
if(!name) {
|
||||
#ifdef DEBUG
|
||||
NDPI_LOG_ERR(ndpi_str, "[NDPI] %s/protoId=%d: mem allocation error\n", protoName, protoId);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if(ndpi_str->proto_defaults[protoId].protoName)
|
||||
ndpi_free(ndpi_str->proto_defaults[protoId].protoName);
|
||||
|
||||
Reference in New Issue
Block a user