Files
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
..
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-05-14 13:17:30 +01:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2020-03-30 21:48:11 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2012-03-21 13:54:42 -07:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-10-10 13:38:31 +00:00
2024-09-01 22:21:12 +00:00