aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-04-04 14:39:29 +0200
committerGitHub <noreply@github.com>2023-04-04 14:39:29 +0200
commit25c111191189f64c4077f9d0609b0fdbdc12c4ad (patch)
tree61f9def5c87b76e0bc2b74e037720726deb0a24e /example/reader_util.c
parentf1193d5e6f7680e6b8195eea33d740987619ac9c (diff)
fuzz: add a new fuzzer triggering the payload analyzer function(s) (#1926)
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 76e54900f..3395153b0 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -266,16 +266,17 @@ void print_payload_stat(struct payload_stats *p) {
/* ***************************************************** */
-void ndpi_report_payload_stats() {
+void ndpi_report_payload_stats(int print) {
struct payload_stats *p, *tmp;
u_int num = 0;
- printf("\n\nPayload Analysis\n");
+ if(print)
+ printf("\n\nPayload Analysis\n");
HASH_SORT(pstats, payload_stats_sort_asc);
HASH_ITER(hh, pstats, p, tmp) {
- if(num <= max_num_reported_top_payloads)
+ if(print && num <= max_num_reported_top_payloads)
print_payload_stat(p);
ndpi_free(p->pattern);