From 32469bf1ab7fa190456a30475e5218712312c2c7 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Wed, 16 Feb 2022 23:22:19 -0500 Subject: [PATCH] fix: state history not flexible array member --- runtime/include/sandbox_state_history.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/include/sandbox_state_history.h b/runtime/include/sandbox_state_history.h index d1d61b9..f52f5b5 100644 --- a/runtime/include/sandbox_state_history.h +++ b/runtime/include/sandbox_state_history.h @@ -18,8 +18,7 @@ static inline void sandbox_state_history_init(struct sandbox_state_history *sandbox_state_history) { #ifdef LOG_STATE_CHANGES - memset(sandbox_state_history, 0, - sizeof(struct sandbox_state_history) + SANDBOX_STATE_HISTORY_CAPACITY * sizeof(sandbox_state_t)); + memset(sandbox_state_history, 0, sizeof(struct sandbox_state_history)); #endif }