Merge pull request #37504 from qarmin/out_of_bound_cursor

Fix array out of bounds access caused by uninitialised variables
This commit is contained in:
Rémi Verschelde
2020-04-02 13:07:55 +02:00
committed by GitHub
16 changed files with 48 additions and 20 deletions
+9 -8
View File
@@ -3374,6 +3374,15 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
r_error = OK;
current_cursor = CURSOR_ARROW;
mouse_mode = MOUSE_MODE_VISIBLE;
for (int i = 0; i < CURSOR_MAX; i++) {
cursors[i] = None;
img[i] = NULL;
}
last_button_state = 0;
xmbstring = NULL;
@@ -3650,14 +3659,6 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
cursor_theme = "default";
}
for (int i = 0; i < CURSOR_MAX; i++) {
cursors[i] = None;
img[i] = NULL;
}
current_cursor = CURSOR_ARROW;
for (int i = 0; i < CURSOR_MAX; i++) {
static const char *cursor_file[] = {