xserver/hw/xwin
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
..
dri xwin: drop swapping request length fields 2025-02-06 22:28:51 +00:00
glx build: Switch to meson 0.56 2024-01-08 10:38:05 +00:00
man XWin.man: fix typos in font change escapes 2025-05-31 15:06:23 -07:00
winclipboard man pages: use .BR to mark up man page references 2025-03-29 13:36:54 -07:00
.gitignore
InitInput.c mi: unexport mieqInit() 2025-02-06 16:45:20 +02:00
InitOutput.c xwin: drop duplicate OsVendorVErrorF() 2025-02-06 23:35:27 +00:00
X.ico
XWin.exe.manifest
XWin.rc
ddraw.h Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
meson.build meson: Add dependencies for hw/xwin/ resource compilation 2021-11-04 13:03:25 +00:00
propertystore.h
system.XWinrc hw/xwin: Add -icon option to set the screen window icon in windowed mode 2019-09-18 19:11:45 +00:00
win.h xwin: drop duplicate OsVendorVErrorF() 2025-02-06 23:35:27 +00:00
winSetAppUserModelID.c
winallpriv.c Move sizeof to second argument in calloc calls 2024-07-19 23:45:21 +00:00
winauth.c os: unexport authorization management functions 2024-04-15 14:55:22 -07:00
winauth.h hw/xwin: Consistently use BOOL type from Xmd.h 2020-04-15 14:13:58 +00:00
winblock.c
winclipboardinit.c Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
winclipboardwrappers.c include: move private defs to dixstruct_priv.h 2024-04-30 00:47:38 +00:00
wincmap.c dix: unexport CreateColormap() 2024-09-01 22:06:49 +00:00
winconfig.c Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
winconfig.h hw: Rename boolean config value field from bool to boolean 2019-07-22 20:28:27 -04:00
wincreatewnd.c dix: unexport fields from opaque.h not used by modules/drivers 2024-06-23 21:19:27 +00:00
wincursor.c mi: unexport miPointerWarpCursor() 2025-02-06 14:38:05 +00:00
windialogs.c xwin: consolidate debugging symbols 2024-03-19 02:05:35 +00:00
windisplay.c dix: unexport fields from opaque.h not used by modules/drivers 2024-06-23 21:19:27 +00:00
windisplay.h
winengine.c hw/xwin: Remove mwextwm mode 2019-05-01 14:06:15 +00:00
winerror.c xwin: drop duplicate OsVendorVErrorF() 2025-02-06 23:35:27 +00:00
winglobals.c hw/xwin: Remove nounicodeclipboard option 2020-04-15 14:13:58 +00:00
winglobals.h hw/xwin: Remove nounicodeclipboard option 2020-04-15 14:13:58 +00:00
winkeybd.c mi: unexport mieqProcessInputEvents() 2025-02-06 16:45:20 +02:00
winkeybd.h
winkeyhook.c xwin: remove always true/set XWIN_MULTIWINDOW conditional/define 2017-08-22 10:59:41 -04:00
winkeynames.h Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
winlayouts.h hw/xwin: Add the Belgian (Comma) keyboard layout 2019-06-28 17:38:36 +00:00
winmessages.h
winmisc.c
winmonitors.c hw/xwin: Make QueryMonitor() slightly less insane 2019-06-28 17:44:58 +00:00
winmonitors.h
winmouse.c xwin: consolidate debugging symbols 2024-03-19 02:05:35 +00:00
winms.h
winmsg.c xwin: consolidate debugging symbols 2024-03-19 02:05:35 +00:00
winmsg.h
winmsgwindow.c xwin: consolidate debugging symbols 2024-03-19 02:05:35 +00:00
winmultiwindowclass.c dix: move props into WindowRec and fix potential NULL deref 2025-06-12 16:34:03 +02:00
winmultiwindowclass.h
winmultiwindowicons.c xwin: winsock.h needs to be included earlier 2024-03-03 23:02:54 +00:00
winmultiwindowicons.h hw/xwin: Fix lingering uses of libX11 types and values 2020-04-15 14:13:58 +00:00
winmultiwindowshape.c xwin: consolidate debugging symbols 2024-03-19 02:05:35 +00:00
winmultiwindowwindow.c include: drop obsolete dixevents.h 2025-06-12 16:17:35 +02:00
winmultiwindowwm.c Move sizeof to second argument in calloc calls 2024-07-19 23:45:21 +00:00
winmultiwindowwndproc.c include: drop obsolete dixevents.h 2025-06-12 16:17:35 +02:00
winos.c
winprefs.c xwin: fix unused variables 2024-03-03 23:02:54 +00:00
winprefs.h hw/xwin: Add -icon option to set the screen window icon in windowed mode 2019-09-18 19:11:45 +00:00
winprefslex.l
winprefsyacc.y
winprocarg.c xwin: drop duplicate OsVendorVErrorF() 2025-02-06 23:35:27 +00:00
winrandr.c randr: unexport and document RROutputSetSubpixelOrder() 2025-06-12 16:28:53 +02:00
winresource.h
winscrinit.c xwin: consolidate debugging symbols 2024-03-19 02:05:35 +00:00
winshadddnl.c dix: move colormap flags into colormap_priv.h and rename them 2024-09-01 22:06:50 +00:00
winshadgdi.c dix: move colormap flags into colormap_priv.h and rename them 2024-09-01 22:06:50 +00:00
wintaskbar.c
wintrayicon.c dix: unexport fields from opaque.h not used by modules/drivers 2024-06-23 21:19:27 +00:00
winvalargs.c hw/xwin: A simpleminded attempt at composition 2019-06-17 21:56:35 +00:00
winwakeup.c
winwindow.c xwin: consolidate debugging symbols 2024-03-19 02:05:35 +00:00
winwindow.h xwin: consolidate debugging symbols 2024-03-19 02:05:35 +00:00
winwndproc.c mi: unexport miPointerSetScreen() 2025-02-06 14:38:05 +00:00