mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-07 05:18:29 +02: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>
(cherry picked from commit 907c501926)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2146>
This commit is contained in:
parent
fe14f01089
commit
cc3a8739eb
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