mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-07 07:50:14 +01:00
Fail CRTC configuration if !vtSema
Unless we check for vtSema before calling into the CRTC and output callbacks, we may end up trying to access video memory that no longer exists, leading to a crash. So if we don't have vtSema, return FALSE to the caller, indicating that we didn't do anything. Fixes #14444.
This commit is contained in:
parent
db248ffb84
commit
bee2ddf35f
1 changed files with 3 additions and 0 deletions
|
|
@ -743,6 +743,9 @@ xf86RandR12CrtcSet (ScreenPtr pScreen,
|
|||
xf86CrtcPtr *save_crtcs;
|
||||
Bool save_enabled = crtc->enabled;
|
||||
|
||||
if (!crtc->scrn->vtSema)
|
||||
return FALSE;
|
||||
|
||||
save_crtcs = xalloc(config->num_output * sizeof (xf86CrtcPtr));
|
||||
if ((randr_mode != NULL) != crtc->enabled)
|
||||
changed = TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue