xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 6 21:33:45 UTC 2021


 hw/xfree86/modes/xf86Crtc.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 75d70612888f18339703315549db781a22c0cb23
Author: Matthieu Herrb <matthieu at herrb.eu>
Date:   Sun Dec 5 21:59:12 2021 +0100

    Better fix for xf86CompatOut() when there are no privates
    
    XF86_CRTC_CONFIG_PTR() will derefence privates[-1] in this case.
    
    Signed-off-by: Matthieu Herrb <matthieu at herrb.eu>

diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 7a562874c..e36adbe00 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -837,11 +837,11 @@ extern _X_EXPORT int xf86CrtcConfigPrivateIndex;
 static _X_INLINE xf86OutputPtr
 xf86CompatOutput(ScrnInfoPtr pScrn)
 {
-    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+    xf86CrtcConfigPtr config;
 
     if (xf86CrtcConfigPrivateIndex == -1)
         return NULL;
-
+    config = XF86_CRTC_CONFIG_PTR(pScrn);
     if (config->compat_output < 0)
         return NULL;
     return config->output[config->compat_output];


More information about the xorg-commit mailing list