Enrico Weigelt, metux IT consult
634700301c
xfree86: parser: fix possible use-after-free xf86freeOutputClassList()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:53 +02:00
Enrico Weigelt, metux IT consult
9b17febf75
xfree86: dri: extra safety checks for NULL pointers / disabled extension
...
Be more cautious on possible NULL pointers or not yet registered
devPrivates. Better a gracefully fail instead of hard segfault.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:50 +02:00
Enrico Weigelt, metux IT consult
567898f17d
xfree86: ddc: safety check for NULL pointer
...
Even though it *should* never be actually hit, it's still safer
to check for NULL instead of letting us crash with segfault.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:47 +02:00
Enrico Weigelt, metux IT consult
c0d068229b
xfree86: common: extra safety checks for NULL pointers
...
Even though it's unlikely ever getting it, still safer to have some
extra checks / asserts than unexpected segfault.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:45 +02:00
Enrico Weigelt, metux IT consult
aad59c6dee
xfree86: common: fix not-found check in xf86platformAddDevice()
...
Safer (and easier to understand) if we look at the result pointer
instead of the counter for testing whether device wasn't found.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:42 +02:00
Enrico Weigelt, metux IT consult
d3c4e100ed
xfree86: common: gracefully handle allocation failure
...
Better try to handle memory allocation gracefully than just hard
crashing by segfault.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:40 +02:00
Enrico Weigelt, metux IT consult
111ca8af21
xfree86: utils: gracefully handle allocation failure.
...
Better failing gracefully instead of hard crash via segfault.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:37 +02:00
Enrico Weigelt, metux IT consult
6c9f2ecc32
xfree86: int10: extra NULL protection
...
Even though chances are really low it's ever getting hit, it's still safer
to have some sanity checks (which don't cost us much) than risking segfault.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:34 +02:00
Enrico Weigelt, metux IT consult
30c60ed578
xfree86: modes: fix uninitialized variables
...
| ../hw/xfree86/modes/xf86RandR12.c: In function ‘xf86ComputeCrtcPan’:
| ../hw/xfree86/modes/xf86RandR12.c:310:54: warning: use of uninitialized value ‘r[1]’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
| 310 | q[i] = m->m[1][i] * r[0] - m->m[0][i] * r[1];
| | ~^~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:32 +02:00
Enrico Weigelt, metux IT consult
7ae09df3ae
xfree86: loader: add assert() in LoadModule()
...
There's (remote) chance that the (internal) module name could become
NULL (eg. allocation failure). Even though chances to hit it are very
low, it's still better to have a check here (that doesn't cost us much),
just in case. Assert fail is still better than segfault, since we're
at least getting some hint what might have happened.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:29 +02:00
Enrico Weigelt, metux IT consult
b28285332e
xfree86: parser: check for alloc failure and possible NULL pointers
...
Adding paranoid extra checks against allocation failure and NULL pointers.
Even though might not be actually hit in practise, it's still better to
be cautious, just in case. And reducing analyzer noise this way.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:26 +02:00
Enrico Weigelt, metux IT consult
88d561bf18
xfree86: x86emu: add extra assert()'s
...
The analyzer warnings (possible NULL dereference) are probably just
false alarms. But for safety adding assert()'s, which don't cost us
anything in non-debug builds.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:33:24 +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
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
c9a1dd9281
randr: unexport and document RRHasScanoutPixmap()
...
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:15 +02:00
Enrico Weigelt, metux IT consult
eb297d3443
randr: unexport and document RRCrtcDetachScanoutPixmap()
...
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:07 +02:00
Enrico Weigelt, metux IT consult
4a5fa21098
randr: unexport and document RRResourcesChanged()
...
Not used by external drivers, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:27:26 +02:00
Enrico Weigelt, metux IT consult
90003b42b6
xfree86: drop xf86VGAarbiter.h
...
It doesn't serve any practical purpose anymore and also isn't included
by any external driver, thus also no need to keep it in SDK.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:24:32 +02:00
Enrico Weigelt, metux IT consult
4e38c99155
xfree86: unexport xf86VGAarbiterAllowDRI()
...
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:24:29 +02:00
Enrico Weigelt, metux IT consult
b20ef5b181
xfree86: drop obsolete xf86VGAarbiterDeviceDecodes()
...
Not used by anybody, so no need to keep it anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:24:26 +02:00
Enrico Weigelt, metux IT consult
ffa080cdf0
xfree86: unexport xf86RemoveInputEventDrainCallback()
...
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:24:15 +02:00
Enrico Weigelt, metux IT consult
885cab379b
xfree86: unexport xf86AddInputEventDrainCallback()
...
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:24:12 +02:00
Enrico Weigelt, metux IT consult
78df73b627
xfree86: unexport xf86LookupInput()
...
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:24:08 +02:00
Enrico Weigelt, metux IT consult
d345549372
xfree86: unexport xf86LookupInputDriver()
...
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:24:05 +02:00
Enrico Weigelt, metux IT consult
b700c6c81d
xfree86: unexport xf86InputEnableVTProbe()
...
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:24:02 +02:00
Enrico Weigelt, metux IT consult
e16424212e
xfree86: unexport xf86PostButtonEventM()
...
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:23:59 +02:00
Enrico Weigelt, metux IT consult
2184917646
xfree86: make xf86VIDrvMsgVerb() static
...
Only used inside xf86Helper.c, so can be made static.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:55 +02:00
Enrico Weigelt, metux IT consult
2cfde50bac
xfree86: make xf86PostKeyEvent() static
...
Only used inside xf86Xinput.c, so can be made static.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:52 +02:00
Enrico Weigelt, metux IT consult
ef8a427e36
xfree86: drop obsolete xf86PostKeyEventM()
...
It's now only a wrapper calling xf86PostKeyEvent(), and no external driver
using it anymore, so we can drop it entirely.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:48 +02:00
Enrico Weigelt, metux IT consult
dba821515b
xfree86: drop unused xf86DeleteInputDriver()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:45 +02:00
Enrico Weigelt, metux IT consult
f89b48962d
xfree86: drop unused xf86EnableDevice()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:42 +02:00
Enrico Weigelt, metux IT consult
77d254cb8b
xfree86: drop unused xf86PostKeyEventP()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:38 +02:00
Enrico Weigelt, metux IT consult
b79112e1bf
xfree86: drop unused xf86PostProximityEventP()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:35 +02:00
Enrico Weigelt, metux IT consult
fd80169cfe
xfree86: drop unused xf86PostMotionEventP()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:32 +02:00
Enrico Weigelt, metux IT consult
bf27c3441f
xfree86: xf86Option: unexport xf86MarkOptionUsedByName()
...
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:23:28 +02:00
Enrico Weigelt, metux IT consult
3ee128c0e1
xfree86: xf86Option: unexport xf86MarkOptionUsed()
...
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:23:25 +02:00
Enrico Weigelt, metux IT consult
2d12c1285f
xfree86: xf86Option: unexport xf86OptionListReport()
...
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:23:22 +02:00
Enrico Weigelt, metux IT consult
167cefbec4
xfree86: xf86Option: make xf86CheckIfOptionUsedByName() static
...
Only used inside of xf86Option.c, so can be made static.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:18 +02:00
Enrico Weigelt, metux IT consult
ed6517ac54
xfree86: xf86Option: drop unused xf86CheckIfOptionUsed()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:14 +02:00
Enrico Weigelt, metux IT consult
150c8ed6ce
xfree86: xf86Option: drop unused xf86ReplacePercentOption()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:11 +02:00
Enrico Weigelt, metux IT consult
d2e10b1c98
xfree86: xf86Option: drop unused xf86ReplaceRealOption()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:08 +02:00
Enrico Weigelt, metux IT consult
228cdd3bfe
xfree86: xf86Option: drop unused xf86GetOptValReal()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:04 +02:00
Enrico Weigelt, metux IT consult
b2425861a2
xfree86: xf86Option: drop unused xf86NewOption()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:23:01 +02:00
Enrico Weigelt, metux IT consult
acfb7b9e96
xfree86: xf86Option: drop unused xf86CheckRealOption()
...
Not used anywhere, so no need to keep it around anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:22:58 +02:00
Enrico Weigelt, metux IT consult
f353a4387a
xfree86: i2c: drop unused xf86I2CWriteWord()
...
Not used anywhere, so no need to keep around it any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:22:54 +02:00
Enrico Weigelt, metux IT consult
0779c670b6
xfree86: i2c: drop unused xf86I2CWriteBytes()
...
Not used anywhere, so no need to keep around it any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:22:51 +02:00
Enrico Weigelt, metux IT consult
d9a1dfb7ba
xfree86: i2c: drop unused xf86I2CReadWord()
...
Not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:22:48 +02:00