aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_classify.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-04-25 16:37:28 +0200
committerGitHub <noreply@github.com>2023-04-25 16:37:28 +0200
commit40b6d5a2e193322e6e93b2eeb087c51d8eb6faad (patch)
treecb5a338df534f710c74107717cc9be54c07211ac /src/lib/ndpi_classify.c
parentde693cbbc91d4144b8d67a8c99c565ea21cece09 (diff)
fuzz: extend fuzzers coverage (#1952)
Diffstat (limited to 'src/lib/ndpi_classify.c')
-rw-r--r--src/lib/ndpi_classify.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/ndpi_classify.c b/src/lib/ndpi_classify.c
index f1037411d..3dba2207e 100644
--- a/src/lib/ndpi_classify.c
+++ b/src/lib/ndpi_classify.c
@@ -268,10 +268,12 @@ ndpi_merge_splt_arrays (const uint16_t *pkt_len, const pkt_timeval *pkt_time,
uint16_t *merged_lens, uint16_t *merged_times)
{
int s,r;
- pkt_timeval ts_start = { 0, 0 }; /* initialize to avoid spurious warnings */
+ pkt_timeval ts_start;
pkt_timeval tmp, tmp_r;
pkt_timeval start_m;
+ ndpi_timer_clear(&ts_start);
+
if(r_idx + s_idx == 0) {
return ;
} else if(r_idx == 0) {
@@ -677,7 +679,7 @@ ndpi_timeval_to_microseconds(pkt_timeval ts)
{
u_int64_t sec = ts.tv_sec;
u_int64_t usec = ts.tv_usec;
- return usec + sec * 1000 * 1000;;
+ return usec + sec * 1000 * 1000;
}
/* **************************************** */