Enrico Weigelt, metux IT consult
6a8ee31e1b
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-06-12 16:34:03 +02:00
..
bigreq.c
Xext: bigreq: drop swapping request length fields
2025-02-06 22:28:49 +00:00
dpms.c
Xext: dpms: need to include geext.h
2025-02-24 20:19:55 +00:00
dpmsproc.h
dpms: Consolidate a bunch of stuff into Xext/dpms.c
2017-03-27 15:59:47 -04:00
geext.c
Xext: drop disable flag for GE extension
2025-02-26 13:34:19 +00:00
geext.h
Xext: geext.h: fix missing include of Xfuncproto.h
2025-02-23 17:53:25 +00:00
hashtable.c
drop obsolete HAVE_DIX_CONFIG_H
2024-10-10 13:38:31 +00:00
hashtable.h
Fix spelling/wording issues
2020-07-05 13:07:33 -07:00
meson.build
panoramix: don't install panoramiX.h and panoramiXsrv.h
2025-02-24 20:06:30 +00:00
panoramiX.c
Xext: panoramix: extra safety checks
2025-06-12 16:33:10 +02:00
panoramiX.h
panoramix: replace FOR_NSCREENS() by FOR_NSCREENS_BACKWARD(i)
2025-06-12 16:24:18 +02:00
panoramiXh.h
Introduce a consistent coding style
2012-03-21 13:54:42 -07:00
panoramiXprocs.c
Xext: panoramix: extra safety checks
2025-06-12 16:33:10 +02:00
panoramiXsrv.h
Replace 'pointer' type with 'void *'
2014-01-12 10:24:11 -08:00
panoramiXSwap.c
Xext: panoramiX: drop now obsolete swap procs
2025-02-06 22:28:51 +00:00
saver.c
Xext: saver: use dixDestroyPixmap() instead of direct driver call
2025-02-12 17:48:30 +01:00
security.c
os: unexport AuthorizationIDOfClient()
2025-02-18 10:53:44 +00:00
securitysrv.h
Xext: security: drop not needed include
2025-06-12 16:30:13 +02:00
shape.c
Xext: shape: fix warning on possible NULL dereference
2025-06-12 16:32:58 +02:00
shm.c
Xext: shm: protect against possible NULL dereference
2025-06-12 16:32:55 +02:00
shmint.h
xext: Fix shmint.h to not use headers outside of sdk_HEADERS
2013-11-14 10:22:15 +09:00
sleepuntil.c
drop obsolete HAVE_DIX_CONFIG_H
2024-10-10 13:38:31 +00:00
sleepuntil.h
Replace 'pointer' type with 'void *'
2014-01-12 10:24:11 -08:00
sync.c
Xext: sync: protect from NULL pointer dereference
2025-06-12 16:32:46 +02:00
syncsdk.h
xsync: Add resource inside of SyncCreate, export SyncCreate
2019-04-17 14:01:17 -07:00
syncsrv.h
sync: Convert from "CARD64" to int64_t.
2017-09-20 13:19:27 -04:00
vidmode.c
Xext: vidmode: protect against alloc failures and NULL pointers
2025-06-12 16:32:51 +02:00
xace.c
os: unexport ClientIsLocal()
2025-02-18 10:53:44 +00:00
xace.h
xace: typesafe hook function for XACE_KEY_AVAIL
2024-06-23 21:07:48 +00:00
xacestr.h
Replace 'pointer' type with 'void *'
2014-01-12 10:24:11 -08:00
xcmisc.c
Xext: xcmisc: drop now obsolete swap procs
2025-02-06 22:28:52 +00:00
xf86bigfont.c
os: move out extension disable flags to corresponing extensions
2025-02-07 12:00:53 +01:00
xf86bigfontsrv.h
Move extension initialisation prototypes into extinit.h
2012-07-09 23:06:41 -07:00
xres.c
Xext: xres: protect against free()ing from non-heap
2025-06-12 16:32:38 +02:00
xselinux.h
include: unpexport SELINUX_* consts from include/global.h
2024-03-25 19:40:04 +00:00
xselinux_ext.c
dix: move props into WindowRec and fix potential NULL deref
2025-06-12 16:34:03 +02:00
xselinux_hooks.c
dix: unexport IsPointerDevice()
2025-06-12 16:19:24 +02:00
xselinux_label.c
drop obsolete HAVE_DIX_CONFIG_H
2024-10-10 13:38:31 +00:00
xselinuxint.h
include: drop obsolete registry.h
2024-03-03 23:20:06 +00:00
xtest.c
Xext: xtest: extra NULL checks
2025-06-12 16:33:00 +02:00
xvdisp.c
panoramix: replace FOR_NSCREENS() by FOR_NSCREENS_BACKWARD(i)
2025-06-12 16:24:18 +02:00
xvdisp.h
xvdix.h
Revert "xv: unexport XvScreenRec and XvScreenPtr"
2025-02-07 10:08:41 +01:00
xvdix_priv.h
Revert "xv: unexport XvScreenRec and XvScreenPtr"
2025-02-07 10:08:41 +01:00
xvmain.c
treewide: NULL-protect ScreenRec->DestroyPixmap() calls
2025-02-06 23:02:06 +00:00
xvmc.c
xvmc: move over protocol version defines into xvmc.c
2025-02-06 23:29:10 +00:00
xvmcext.h
xvmc: unexport XvMCFindXvImage()
2024-10-10 19:59:48 +00:00