From 2a0052f25e9781928b62b28a7a032e690903cf48 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Sun, 10 Sep 2023 15:07:52 +0200 Subject: fuzz: add fuzzers to test reader_util code (#2080) --- src/lib/ndpi_domain_classify.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/ndpi_domain_classify.c b/src/lib/ndpi_domain_classify.c index f1a319067..385796e08 100644 --- a/src/lib/ndpi_domain_classify.c +++ b/src/lib/ndpi_domain_classify.c @@ -35,7 +35,10 @@ ndpi_domain_classify* ndpi_domain_classify_alloc() { int i; ndpi_domain_classify *cat = (ndpi_domain_classify*)ndpi_malloc(sizeof(ndpi_domain_classify)); - + + if(!cat) + return NULL; + for(i=0; iclasses[i].class_id = 0, cat->classes[i].domains = NULL; -- cgit v1.2.3