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:
commit
5f11e15571
16 changed files with 48 additions and 20 deletions
|
|
@ -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[] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue