xserver/hw
Olivier Fourdan 21916ae148 xwayland: Check for outputs before lease devices
In xwl_randr_request_lease(), the code checks first for leased device,
and then checks for existing output for lease.

The former assumes there are outputs for lease whereas the latter checks
for the output, connector and lease.

So if there is any existing rrLease->outputs[]->devPrivate unset, the
code would crash on a NULL pointer dereference on the first sanity check
before having a chance to reach the second check that would have caught
the problem.

Invert the sanity checks so that we would catch this first and return a
BadValue instead of possibly segfaulting.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Xaver Hugl <xaver.hugl@kde.org>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1482>
2024-04-30 09:13:34 +02:00
..
kdrive include: split out non-exported prototypes to dix_priv.h 2024-04-30 00:47:38 +00:00
vfb os: unexport Os*() functions 2024-04-16 14:20:30 +02:00
xfree86 include: move private definitions out of exevents.h 2024-04-30 00:47:38 +00:00
xnest include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
xquartz include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
xwayland xwayland: Check for outputs before lease devices 2024-04-30 09:13:34 +02:00
xwin include: move private definitions out of extinit.h 2024-04-30 00:47:38 +00:00
meson.build Drop DMX DDX 2021-09-07 09:34:31 +00:00