fuzz: extend fuzzers coverage (#1952)

This commit is contained in:
Ivan Nardi
2023-04-25 16:37:28 +02:00
committed by GitHub
parent de693cbbc9
commit 40b6d5a2e1
15 changed files with 107 additions and 38 deletions
+5 -2
View File
@@ -1096,6 +1096,7 @@ int ndpi_hw_init(struct ndpi_hw_struct *hw,
if((hw->s = (double*)ndpi_calloc(hw->params.num_season_periods, sizeof(double))) == NULL) {
ndpi_free(hw->y);
hw->y = NULL;
return(-1);
}
@@ -1213,8 +1214,10 @@ void ndpi_hw_reset(struct ndpi_hw_struct *hw) {
hw->num_values = 0;
hw->u = hw->v = hw->sum_square_error = 0;
memset(&hw->y, 0, (hw->params.num_season_periods * sizeof(u_int64_t)));
memset(&hw->s, 0, (hw->params.num_season_periods * sizeof(double)));
if(hw->y)
memset(hw->y, 0, (hw->params.num_season_periods * sizeof(u_int64_t)));
if(hw->s)
memset(hw->s, 0, (hw->params.num_season_periods * sizeof(double)));
}
/* ********************************************************************************* */