xserver/Xi
Alan Coopersmith d10589cc09 Xi: avoid NULL pointer dereference if GetXTestDevice returns NULL
The comments in that function say "This only happens if master is a
slave device. don't do that" but static analysis doesn't respect that.

Found by Oracle Parfait 13.3:
   Null pointer dereference [null-pointer-deref]:
      Read from null pointer XTestptr
        at line 274 of Xi/xichangehierarchy.c in function 'remove_master'.
          Null pointer introduced at line 691 of Xext/xtest.c in function
	   'GetXTestDevice'.
          Function GetXTestDevice may return constant 'NULL' at line 691,
	   called at line 273 of Xi/xichangehierarchy.c in function
	   'remove_master'.
   Null pointer dereference [null-pointer-deref]:
      Read from null pointer XTestkeybd
        at line 279 of Xi/xichangehierarchy.c in function 'remove_master'.
          Null pointer introduced at line 691 of Xext/xtest.c in function
	   'GetXTestDevice'.
          Function GetXTestDevice may return constant 'NULL' at line 691,
	   called at line 278 of Xi/xichangehierarchy.c in function
	   'remove_master'.

Fixes: 0814f511d ("input: store the master device's ID in the devPrivate for XTest devices.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1730>
2024-10-28 05:38:25 +00:00
..
XIstubs.h include: unexport XIstubs.h 2024-09-01 22:21:12 +00:00
allowev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
allowev.h
chgdctl.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
chgdctl.h
chgfctl.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
chgfctl.h
chgkbd.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
chgkbd.h
chgkmap.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
chgkmap.h
chgprop.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
chgprop.h
chgptr.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
chgptr.h
closedev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
closedev.h
devbell.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
devbell.h
exevents.c dix: unexport non-public functions from dixgrabs.h and document prototypes 2024-10-10 13:50:57 +00:00
exglobals.h xinput: Remove PropagateMask 2020-03-30 21:48:11 +00:00
extinit.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getbmap.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getbmap.h
getdctl.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getdctl.h
getfctl.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getfctl.h
getfocus.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getfocus.h
getkmap.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getkmap.h
getmmap.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getmmap.h
getprop.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getprop.h
getselev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getselev.h
getvers.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
getvers.h
grabdev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
grabdev.h
grabdevb.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
grabdevb.h
grabdevk.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
grabdevk.h
gtmotion.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
gtmotion.h
listdev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
listdev.h
meson.build Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
opendev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
opendev.h
queryst.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
queryst.h
selectev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
selectev.h
sendexev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
sendexev.h
setbmap.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
setbmap.h
setdval.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
setdval.h
setfocus.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
setfocus.h
setmmap.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
setmmap.h
setmode.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
setmode.h
stubs.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
ungrdev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
ungrdev.h
ungrdevb.c dix: unexport non-public functions from dixgrabs.h and document prototypes 2024-10-10 13:50:57 +00:00
ungrdevb.h
ungrdevk.c dix: unexport non-public functions from dixgrabs.h and document prototypes 2024-10-10 13:50:57 +00:00
ungrdevk.h
xiallowev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xiallowev.h
xibarriers.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xibarriers.h Xi: free barrier code at reset time 2013-05-07 09:41:19 +10:00
xichangecursor.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xichangecursor.h
xichangehierarchy.c Xi: avoid NULL pointer dereference if GetXTestDevice returns NULL 2024-10-28 05:38:25 +00:00
xichangehierarchy.h xinput: Silence a warning from gcc 11 2021-08-17 16:02:44 -04:00
xigetclientpointer.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xigetclientpointer.h
xigrabdev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xigrabdev.h
xipassivegrab.c dix: unexport non-public functions from dixgrabs.h and document prototypes 2024-10-10 13:50:57 +00:00
xipassivegrab.h
xiproperty.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xiproperty.h
xiquerydevice.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xiquerydevice.h
xiquerypointer.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xiquerypointer.h
xiqueryversion.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xiqueryversion.h
xiselectev.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xiselectev.h
xisetclientpointer.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xisetclientpointer.h
xisetdevfocus.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xisetdevfocus.h
xiwarppointer.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xiwarppointer.h