Commit 575754d
authored
Fix x11 undefined behavior (#18323)
* Fix an OOB memory access in x11 input if >16 devices
It looks like the mouse device list was meant to be initialized with
-1, but the mouse device list should contain only up to `j` values
where j is the number of actual mice.
* Also make sure j stays under max mouse idx
This is just to be safe in case we have... more than 16 master pointers1 parent 044c9f8 commit 575754d
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
99 | 101 | | |
100 | | - | |
| 102 | + | |
101 | 103 | | |
102 | | - | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
0 commit comments