mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xf86: check return value of XF86_CRTC_CONFIG_PTR in xf86CompatOutput()
If privates[xf86CrtcConfigPrivateIndex].ptr is NULL, this will cause a segfault. Possible fix for !1241 Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/835>
This commit is contained in:
committed by
Enrico Weigelt, metux IT consult
parent
f5dd326d3f
commit
b2c93ff45f
@@ -842,7 +842,7 @@ xf86CompatOutput(ScrnInfoPtr pScrn)
|
||||
if (xf86CrtcConfigPrivateIndex == -1)
|
||||
return NULL;
|
||||
config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
if (config->compat_output < 0)
|
||||
if ((config == NULL) || (config->compat_output < 0))
|
||||
return NULL;
|
||||
return config->output[config->compat_output];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user