fix: state history not flexible array member

master
Sean McBride 3 years ago
parent 5f5d99952a
commit 32469bf1ab

@ -18,8 +18,7 @@ static inline void
sandbox_state_history_init(struct sandbox_state_history *sandbox_state_history) sandbox_state_history_init(struct sandbox_state_history *sandbox_state_history)
{ {
#ifdef LOG_STATE_CHANGES #ifdef LOG_STATE_CHANGES
memset(sandbox_state_history, 0, memset(sandbox_state_history, 0, sizeof(struct sandbox_state_history));
sizeof(struct sandbox_state_history) + SANDBOX_STATE_HISTORY_CAPACITY * sizeof(sandbox_state_t));
#endif #endif
} }

Loading…
Cancel
Save