From 74347603807f2af172cd86ab815923a11702a9ca Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 8 Apr 2019 16:06:57 +0200 Subject: [PATCH] Fix jump over uninitialized value in OS Unix/X11 (cherry picked from commit 0bcf0314f7a2d832622a87fe2bb04022a889ac54) --- drivers/unix/os_unix.cpp | 1 + platform/x11/os_x11.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index e7550903a8f..2778590658e 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -108,6 +108,7 @@ void OS_Unix::initialize_debugging() { if (ScriptDebugger::get_singleton() != NULL) { struct sigaction action; + memset(&action, 0, sizeof(action)); action.sa_handler = handle_interrupt; sigaction(SIGINT, &action, NULL); } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 0fe91f3d002..ba74ba24377 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -3238,6 +3238,8 @@ OS_X11::OS_X11() { AudioDriverManager::add_driver(&driver_alsa); #endif + xi.opcode = 0; + xi.last_relative_time = 0; layered_window = false; minimized = false; xim_style = 0L;