From 87aab69644815c897fa0f86e879905be2eac83c2 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Tue, 22 Oct 2024 21:21:57 +0200 Subject: [PATCH] fix(core): memory corruption on emulator init Found by AddressSanitizer. --- core/embed/trezorhal/unix/systimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/embed/trezorhal/unix/systimer.c b/core/embed/trezorhal/unix/systimer.c index a678efd982..1088f96bbd 100644 --- a/core/embed/trezorhal/unix/systimer.c +++ b/core/embed/trezorhal/unix/systimer.c @@ -38,7 +38,7 @@ void systimer_init(void) { return; } - memset(&drv, 0, sizeof(systimer_driver_t)); + memset(drv, 0, sizeof(systimer_driver_t)); drv->initialized = true; }