aboutsummaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorVitaly Lavrov <vel21ripn@gmail.com>2021-06-07 08:08:39 +0000
committerGitHub <noreply@github.com>2021-06-07 10:08:39 +0200
commit2fcf641e87edbd7188b5c8390c3e12128638f01a (patch)
treea9c89aaa231bf0d67f5070507f3d01b5fab86451 /fuzz
parentb241dd5e6b00dfcbb927dd56938aff33dd0a603c (diff)
Fixed uninitialized memory use. (#1198)
The pointer "header" must be initialized before first call pcap_next_ex().
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/fuzz_ndpi_reader.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fuzz/fuzz_ndpi_reader.c b/fuzz/fuzz_ndpi_reader.c
index 49460ef4f..465aa227d 100644
--- a/fuzz/fuzz_ndpi_reader.c
+++ b/fuzz/fuzz_ndpi_reader.c
@@ -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 */) {