Enrico Weigelt, metux IT consult
016f62baad
glamor: BUG_* checks on NULL atlas
...
If this happens, we really have a bug, so better spit out a warning
instead of just segfault'ing.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:51 +02:00
Enrico Weigelt, metux IT consult
b0c9e95a61
glamor: BUG_RETURN*() on pixmap private data
...
Usually shouldn't happen trying to accessing pixmap's glamor private
data w/o having it initialized first. But just in case there's some
subtle bug, adding extra checks, which don't cost us much.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:49 +02:00
Enrico Weigelt, metux IT consult
faef79be75
glamor: protect from NULL return of GetPictureScreenIfSet()
...
GetPictureScreenIfSet() is designed that NULL can be returned.
Even though it should not happen in this particular case,
better be prepared for that, instead of just segfault'ing.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:46 +02:00
Enrico Weigelt, metux IT consult
5fd11ec4a6
glamor: NULL-protect GLAMOR_PIXMAP_PRIV_HAS_FBO()
...
It could potentially be called with NULL pointer, but can't handle it,
so when that happens, it's a bug. Adding a BUG_RETURN_VAL() call here,
so it's giving us a hint where to look at.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:44 +02:00
Enrico Weigelt, metux IT consult
8b970b4bde
xkb: fix uninitialized variables in XkmReadFile()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:40 +02:00
Enrico Weigelt, metux IT consult
269cd0f8ac
xkb: maprules: fix potential NULL pointer dereference warnings
...
Even though the cases might be hypothetical, it's still better having some
tiny extra checks (that might be even optimized-out) and reduce the analyzer
noise a bit.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:37 +02:00
Enrico Weigelt, metux IT consult
427400fcc0
xkb: fix NULL pointer dereference in XkbDDXLoadKeymapByNames()
...
In the rare case that NULL kbd is passed and also no components provided,
the corresponding error message code crashes on NULL pointer dereference.
| ../xkb/ddxLoad.c: In function ‘XkbDDXLoadKeymapByNames’:
| ../xkb/ddxLoad.c:393:25: warning: dereference of NULL ‘keybd’ [CWE-476] [-Wanalyzer-null-dereference]
| 393 | keybd->name ? keybd->name : "(unnamed keyboard)");
| | ~~~~~^~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:34 +02:00
Enrico Weigelt, metux IT consult
a1d1ee930d
mi: miwideline: fix uninitialized fields in miWideLine()
...
| ../mi/miwideline.c: In function ‘miRoundCapClip’:
| ../mi/miwideline.c:1404:15: warning: use of uninitialized value ‘*face.dy’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
| 1404 | dx = -face->dy;
| | ~~~~^~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:32 +02:00
Enrico Weigelt, metux IT consult
3b9ca877a4
mi: NULL-protect miFillGeneralPoly()
...
| In file included from ../mi/mipoly.c:59:
| ../mi/mipoly.c: In function ‘miFillGeneralPoly’:
| ../mi/mipoly.h:162:12: warning: dereference of NULL ‘pAET’ [CWE-476] [-Wanalyzer-null-dereference]
| 162 | if (pAET->ymax == y) { /* leaving this edge */ \
| ../mi/mipoly.c:591:17: note: in expansion of macro ‘EVALUATEEDGEEVENODD’
| 591 | EVALUATEEDGEEVENODD(pAET, pPrevAET, y);
| | ^~~~~~~~~~~~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:29 +02:00
Enrico Weigelt, metux IT consult
fccc98645b
mi: NULL-protection in ‘miInitVisuals()
...
NULL-Protect just against 'vid' might remain NULL.
| ../mi/micmap.c: In function ‘miInitVisuals’:
| ../mi/micmap.c:505:32: warning: dereference of NULL ‘vid’ [CWE-476] [-Wanalyzer-null-dereference]
| 505 | visual->vid = *vid = FakeClientID(0);
| | ~~~~~^~~~~~~~~~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:26 +02:00
Enrico Weigelt, metux IT consult
a48e2d8532
Xi: exevents: extra asserts on NULL pointers
...
Even though shouldn't be practically hit, better have some asserts,
giving us an idea of the point of cause, instead of segfaulting,
just in case.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:22 +02:00
Enrico Weigelt, metux IT consult
cb69b80973
Xi: xibarriers: protect add_master_func() from allocation failure
...
Try to gracefully handle OOM situation, at not hard crashing.
| ../Xi/xibarriers.c: In function ‘add_master_func’:
| ../Xi/xibarriers.c:729:19: warning: dereference of NULL ‘pbd’ [CWE-476] [-Wanalyzer-null-dereference]
| 729 | pbd->deviceid = *deviceid;
| | ~~~~~~~~~~~~~~^~~~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:19 +02:00
Enrico Weigelt, metux IT consult
d91121e876
Xi: exevents: NULL protection in ‘DeviceEventSuppressForWindow()
...
Protect against `inputMasks` could be NULL.
| ../Xi/exevents.c: In function ‘DeviceEventSuppressForWindow’:
| ../Xi/exevents.c:3246:32: warning: dereference of NULL ‘inputMasks’ [CWE-476] [-Wanalyzer-null-dereference]
| 3246 | FreeResource(inputMasks->inputClients->resource, X11_RESTYPE_NONE);
| | ~~~~~~~~~~^~~~~~~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:15 +02:00
Enrico Weigelt, metux IT consult
f022f1c764
Xi: fix double-free warning in FreePointerBarrierClient()
...
| ../Xi/xibarriers.c: In function ‘FreePointerBarrierClient’:
| ../Xi/xibarriers.c:127:9: warning: double-‘free’ of ‘pbd’ [CWE-415] [-Wanalyzer-double-free]
| 127 | free(pbd);
| | ^~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:08 +02:00
Enrico Weigelt, metux IT consult
1c088613ba
include: don't install propertyst.h
...
Nothing in here needs anything from that include file, so no need for
including it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:31:02 +02:00
Enrico Weigelt, metux IT consult
73d2d99ace
xfree86: xf86Priv.h: dont include propertyst.h
...
Nothing in here needs anything from that include file, so no need for
including it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:30:45 +02:00
Enrico Weigelt, metux IT consult
505138167e
xfree86: xf86.h: dont include propertyst.h
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:30:20 +02:00
Enrico Weigelt, metux IT consult
9d98f3a7ca
xfree86: xf86Events.c: add missing include of property.h
...
the file calls some functions from property.h, so it needs to be included.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:30:16 +02:00
Enrico Weigelt, metux IT consult
42dd730e5a
Xext: security: drop not needed include
...
Not needed in that header file, so drop it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:30:13 +02:00
Enrico Weigelt, metux IT consult
aebc3c592e
randr: unexport and document RRTransformCopy()
...
Not used by any external drivers, so no neeed to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:30:10 +02:00
Enrico Weigelt, metux IT consult
67c086a9f0
randr: unexport and document RRTransformSetFilter()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:30:07 +02:00
Enrico Weigelt, metux IT consult
b2f3ef787c
randr: unexport and document RRTransformEqual()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:30:04 +02:00
Enrico Weigelt, metux IT consult
07950dd411
randr: unexport and document RRTransformInit()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:30:01 +02:00
Enrico Weigelt, metux IT consult
5f776e857d
randr: unexport and document RRXineramaExtensionInit()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:59 +02:00
Enrico Weigelt, metux IT consult
5998871151
randr: unexport and document RRQueryOutputProperty()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:56 +02:00
Enrico Weigelt, metux IT consult
81df43802b
randr: unexport and document RRGetOutputProperty()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:53 +02:00
Enrico Weigelt, metux IT consult
d3e1cc205c
randr: unexport resource type IDs
...
Not used by any external drivers, so no need to keep them exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:50 +02:00
Enrico Weigelt, metux IT consult
097b9e9163
randr: unexport and document RRConfigureProviderProperty()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:47 +02:00
Enrico Weigelt, metux IT consult
7c0c2f1460
randr: unexport and document RRChangeProviderProperty()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:44 +02:00
Enrico Weigelt, metux IT consult
7b303bd8d0
randr: unexport and document RRDeleteProviderProperty()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:39 +02:00
Enrico Weigelt, metux IT consult
538a8a80cd
randr: unexport and document RRQueryProviderProperty()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:36 +02:00
Enrico Weigelt, metux IT consult
08110b9192
randr: unexport and document RRGetProviderProperty()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:33 +02:00
Enrico Weigelt, metux IT consult
1e7752f10d
randr: unexport and document RRProviderAutoConfigGpuScreen()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:30 +02:00
Enrico Weigelt, metux IT consult
9bbaf79703
randr: unexport and document RRDeliverProviderEvent()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:28 +02:00
Enrico Weigelt, metux IT consult
d9ee0e7901
randr: unexport and document RRProviderDestroy()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:25 +02:00
Enrico Weigelt, metux IT consult
8632c2e76e
randr: unexport and document RRProviderSetCapabilities()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:22 +02:00
Enrico Weigelt, metux IT consult
cc8e32ef5e
randr: unexport and document RRProviderCreate()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:19 +02:00
Enrico Weigelt, metux IT consult
506ca26514
randr: unexport and document RRProviderInitErrorValue()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:16 +02:00
Enrico Weigelt, metux IT consult
20d1a1f412
randr: unexport and document RRProviderInit()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:13 +02:00
Enrico Weigelt, metux IT consult
76aaccc4f3
randr: unexport and document RRDeleteAllOutputProperties()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:11 +02:00
Enrico Weigelt, metux IT consult
930d3cb5ce
randr: unexport and document RRPointerScreenConfigured()
...
Not usde by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:07 +02:00
Enrico Weigelt, metux IT consult
13d8ee893f
randr: unexport and document RROutputInitErrorValue()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:04 +02:00
Enrico Weigelt, metux IT consult
3bc4221ec2
randr: unexport and document RROutputInit()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:29:01 +02:00
Enrico Weigelt, metux IT consult
e39070b448
randr: unexport and document RRDeliverOutputEvent()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:28:56 +02:00
Enrico Weigelt, metux IT consult
55474ddf66
randr: unexport and document RROutputSetSubpixelOrder()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:28:53 +02:00
Enrico Weigelt, metux IT consult
2214ebdc44
randr: unexport and document RROutputDeleteUserMode()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:28:50 +02:00
Enrico Weigelt, metux IT consult
df8db3c479
randr: unexport and document RROutputAddUserMode()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:28:48 +02:00
Enrico Weigelt, metux IT consult
be111fce3f
randr: unexport and document RRModeInitErrorValue()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:28:44 +02:00
Enrico Weigelt, metux IT consult
eb6af16528
randr: unexport and document RRModeInit()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:28:41 +02:00
Enrico Weigelt, metux IT consult
60a2d2dc37
randr: unexport and document RRModesForScreen()
...
Not used by any external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:28:36 +02:00