(release/25.1) xnest: Check malloc return values in GCOps to avoid NULL dereferences - #3666
Conversation
Reviewed Verdict: PASSIdentical +12/−2 cherry-pick of the No ABI impact (nested software DDX, no external driver/nvidia surface). Pure defensive No blocking findings. |
When building the xserver SDK on Linux (e.g. GitHub Actions Ubuntu runners), the BSD console macros (CONFIG_BSD_CONSOLE, CSRG_BASED, PCVT_SUPPORT, SYSCONS_SUPPORT, WSCONS_SUPPORT) were not defined because they were gated on host_machine.system(). This caused driver builds (e.g. xf86-input-keyboard) to fail when building against the SDK, as they reference xf86Info.consType and the PCCONS/SYSCONS/PCVT/WSCONS constants. Fix by defining these macros unconditionally in conf_data and xorg_data when build_xorg_sdk is true, so the installed SDK headers contain them regardless of the build platform. For non-SDK builds, keep the platform-appropriate conditional values. Also add CONFIG_BSD_CONSOLE to the xlibre-server.h template. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
6b0e139 to
7c6acea
Compare
…lds" This reverts commit 64757a1.
The Cygwin meson runtime resolves to /usr/bin/python3.12.exe (python312 is pulled in transitively as a meson dependency), while the workflow only installed python39-lxml. hw/xwin/glx/meson.build therefore failed with "python3 lxml module not found" on every PR. Install the lxml module for the Python interpreter meson actually uses. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Check malloc() return values for NULL in xnestBitBlitHelper(), xnestPolyText8(), and xnestPolyText16() to prevent potential NULL pointer dereferences (cherry picked from commit eae9444) Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
7c6acea to
f627a48
Compare
626b3bc to
62a1396
Compare
malloc() require check on valid ptr
Check malloc() return values for NULL in xnestBitBlitHelper(), xnestPolyText8(), and
xnestPolyText16() to prevent potential NULL pointer dereferences.
Backport of #3637 (based on its current head commit
eae9444; original PR not merged yet)
(cherry picked from commit eae9444)