Fixed uninitialized memory use. (#1198)

The pointer "header" must be initialized before first call pcap_next_ex().
This commit is contained in:
Vitaly Lavrov
2021-06-07 10:08:39 +02:00
committed by GitHub
parent b241dd5e6b
commit 2fcf641e87
+1
View File
@@ -86,6 +86,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
sizeof(workflow->stats.protocol_flows));
ndpi_finalize_initialization(workflow->ndpi_struct);
header = NULL;
r = pcap_next_ex(pkts, &header, &pkt);
while (r > 0) {
if(header->caplen >= 42 /* ARP+ size */) {