mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-18 13:00:37 +01: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:
parent
444822f7c1
commit
907c501926
1 changed files with 1 additions and 1 deletions
|
|
@ -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];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue