timing.c: use memset to initialize the structure, from Gilles Peskine

Signed-off-by: Gianfranco Costamagna <[email protected]>
Signed-off-by: Gianfranco Costamagna <[email protected]>
This commit is contained in:
Gianfranco Costamagna
2024-01-03 12:13:24 +01:00
parent ca902dbd9c
commit f88dd840a2
+2 -1
View File
@@ -399,8 +399,9 @@ int mbedtls_timing_self_test(int verbose)
int hardfail = 0;
struct mbedtls_timing_hr_time hires;
uint32_t a = 0, b = 0;
mbedtls_timing_delay_context ctx = {};
mbedtls_timing_delay_context ctx;
memset(ctx, 0, sizeof(ctx));
if (verbose != 0) {
mbedtls_printf(" TIMING tests note: will take some time!\n");
}