mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-30 07:49:56 +00:00
mi: guard against NULL event pointer
In miPointerSetPosition(), ensure nevents and events pointers are non-NULL before checking for and updating barrier event coordinates to avoid potential NULL pointer dereferences
This commit is contained in:
parent
cf0d4a3456
commit
11bb4b1b73
1 changed files with 1 additions and 1 deletions
|
|
@ -702,7 +702,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, double *screenx,
|
|||
|
||||
/* check if we generated any barrier events and if so, update root x/y
|
||||
* to the fully constrained coords */
|
||||
if (should_constrain_barriers) {
|
||||
if (should_constrain_barriers && nevents && events) {
|
||||
for (i = 0; i < *nevents; i++) {
|
||||
if (events[i].any.type == ET_BarrierHit ||
|
||||
events[i].any.type == ET_BarrierLeave) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue