mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 09:20:02 +01:00
xfree86: Return NULL from xf86CompatOutput if no compat_output is defined
If no compat_output is defined, we inadvertently (attempt to) return whatever data is at index -1. Instead, return NULL since that's what callers are expecting. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
This commit is contained in:
parent
cad831f398
commit
28159eff6b
1 changed files with 2 additions and 0 deletions
|
|
@ -745,6 +745,8 @@ xf86CompatOutput(ScrnInfoPtr pScrn)
|
|||
{
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
|
||||
if (config->compat_output < 0)
|
||||
return NULL;
|
||||
return config->output[config->compat_output];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue