xserver/Xext/xinput
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Enrico Weigelt, metux IT consult 8b865dbb56 xinput: make barrier event emission NULL-safe in input_constrain_cursor()
input_constrain_cursor() writes pointer-barrier hit/leave events into the
caller-supplied events buffer and bumps *nevents. It dereferenced both
unconditionally (barrier_events->barrier_event = ev; *nevents += 1), so
calling it with a NULL events/nevents pair crashed on the first barrier.

Callers do not pass NULL today (the only NULL call, GetTouchEvents ->
positionSprite(), is hardcoded to Absolute mode where this function's
barrier paths are skipped), but the function is a straightforward
NULL-safety hazard. Guard event emission on a can_emit flag derived from
both pointers, while still performing the barrier clamping so cursor
coordinates are constrained correctly even when no events can be emitted.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-10-07 15:56:14 +02:00
..
allowev.c
chgdctl.c
chgfctl.c
chgkbd.c
chgkmap.c
chgprop.c
chgptr.c
chgptr.h
closedev.c
devbell.c
exevents.c Xi: Guard against NULL event pointer 2026-08-31 14:47:14 +02:00
exglobals.h Xi: turn XIAllMasks from variable into #define 2026-06-29 14:30:53 +02:00
extinit.c Xi: byte-swap DeviceChanged valuator and scroll data 2026-10-01 19:00:26 +02:00
getbmap.c
getdctl.c
getfctl.c Xi: zero feedback reply buffer in ProcXGetFeedbackControl 2026-06-23 17:28:08 +02:00
getfocus.c
getkmap.c
getmmap.c
getprop.c
getprop.h
getselev.c
getvers.c
grabdev.c
grabdev.h
grabdevb.c
grabdevk.c
gtmotion.c
handlers.h
listdev.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
meson.build
opendev.c Xi: parentheses around macro argument symbols 2026-06-25 07:31:44 +02:00
queryst.c Xi: fix NULL pointer dereference in ProcXQueryDeviceState 2026-06-23 17:28:42 +02:00
selectev.c Xi: turn XIAllMasks from variable into #define 2026-06-29 14:30:53 +02:00
sendexev.c
setbmap.c
setdval.c
setfocus.c
setmmap.c
setmode.c
stubs.c
ungrdev.c
ungrdevb.c
ungrdevk.c
xiallowev.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
xibarriers.c xinput: make barrier event emission NULL-safe in input_constrain_cursor() 2026-10-07 15:56:14 +02:00
xibarriers.h
xichangecursor.c
xichangehierarchy.c treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
xichangehierarchy.h treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
xigetclientpointer.c
xigrabdev.c treewide: replace min/max macros by non-exported MIN/MAX and deprecate them 2026-06-25 14:06:17 +02:00
xipassivegrab.c treewide: replace min/max macros by non-exported MIN/MAX and deprecate them 2026-06-25 14:06:17 +02:00
xiproperty.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
xiproperty.h
xiquerydevice.c Xi: byte-swap XIQueryDevice ScrollClass flags 2026-10-01 18:55:18 +02:00
xiquerydevice.h
xiquerypointer.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
xiqueryversion.c treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
xiselectev.c Xi: xiselectev: fix OOB read in ProcXISelectEvents' non-swapped path 2026-07-03 19:59:53 +02:00
xisetclientpointer.c
xisetdevfocus.c
XIstubs.h
xiwarppointer.c