Skip to content

Commit

Permalink
iperf_api: memset entire malloc
Browse files Browse the repository at this point in the history
in the function iperf_new_test
the  bitrate_limit_intervals_traffic_bytes array
was only memset for the size of the sizeof
return type, instead of the entire array.
  • Loading branch information
RABijl committed Mar 19, 2024
1 parent b86ba29 commit 60b0c18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iperf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -2878,7 +2878,7 @@ iperf_new_test()
i_errno = IENEWTEST;
return NULL;
}
memset(test->bitrate_limit_intervals_traffic_bytes, 0, sizeof(sizeof(iperf_size_t) * MAX_INTERVAL));
memset(test->bitrate_limit_intervals_traffic_bytes, 0, sizeof(iperf_size_t) * MAX_INTERVAL);

/* By default all output goes to stdout */
test->outfile = stdout;
Expand Down

0 comments on commit 60b0c18

Please sign in to comment.