From 17846dd06396c196ea200386031875a26dbc16b3 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 24 Feb 2020 10:22:27 +0100 Subject: [PATCH] AK: Zero-initialize the internal storage of Optional --- AK/Optional.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/Optional.h b/AK/Optional.h index 4c27ea545d..80986dca78 100644 --- a/AK/Optional.h +++ b/AK/Optional.h @@ -160,7 +160,7 @@ private: ASSERT(m_has_value); return *reinterpret_cast(&m_storage); } - char m_storage[sizeof(T)]; + u8 m_storage[sizeof(T)] { 0 }; bool m_has_value { false }; };