xserver/hw
Enrico Weigelt, metux IT consult 65c0c35197 (!1967) dix: move props into WindowRec and fix potential NULL deref
The pointer to the window properties is currently inside the WindowOptional
structure, which may or may not exist at any given time. Thus, before accessing
those fields, at least need to check whether it exists, potentially need to
create it first.

Since a pointer is small (in relation to WindowRec) and windows having properties
is a pretty common, we can make our life much simpler here by moving the pointer
directly into WindowRec, so we don't need extra WindowOptionalRec allocation.

This also fixes an analyzer warning on potential NULL dereference issue:

| ../dix/property.c: In function ‘dixChangeWindowProperty’:
|../dix/property.c:343:37: warning: dereference of NULL ‘*pWin.optional’ [CWE-476] [-Wanalyzer-null-dereference]
|  343 |         pProp->next = pWin->optional->userProps;
|      |                       ~~~~~~~~~~~~~~^~~~~~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-22 17:34:41 +02:00
..
kdrive (!1987) glamor: unexport glamor_set_glvnd_vendor() 2025-05-22 17:34:36 +02:00
vfb man pages: use .BR to mark up man page references 2025-03-29 13:36:54 -07:00
xfree86 (!1969) xfree86: parser: fix possible use-after-free xf86freeOutputClassList() 2025-05-22 17:34:41 +02:00
xnest Xnest: use authorative declarations from X11/XKBlib.h 2025-02-28 17:27:05 +00:00
xquartz man pages: use .BR to mark up man page references 2025-03-29 13:36:54 -07:00
xwayland (!1974) os: drop self-limiting resources 2025-05-22 17:34:39 +02:00
xwin (!1967) dix: move props into WindowRec and fix potential NULL deref 2025-05-22 17:34:41 +02:00
meson.build meson.build: print a summary of the DDX to build 2025-03-24 03:05:35 +00:00