Module Name:    xsrc
Committed By:   tsutsui
Date:           Sat Jul 30 16:34:00 UTC 2022

Modified Files:
        xsrc/external/mit/xorg-server/dist/hw/xfree86/modes: xf86Crtc.h

Log Message:
Pull an upstream (post-21.1) fix for xf86CompatOutput().

https://gitlab.freedesktop.org/xorg/xserver/-/commit/75d70612888f18339703315549db781a22c0cb23
This is an additional fix against the previous revision that is
avaiable in 21.1 branch:
https://gitlab.freedesktop.org/xorg/xserver/-/commit/80eeff3ebac772e25c9107199989e677457dbe06
and may avoid a possible out of bounds access at least on dumb wsfb servers.

ok'ed by mrg@ on current-users@:
https://mail-index.netbsd.org/current-users/2022/07/24/msg042731.html


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.2 \
    xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Crtc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Crtc.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Crtc.h:1.1.1.7 xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Crtc.h:1.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Crtc.h:1.1.1.7	Fri Jul 15 02:12:51 2022
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Crtc.h	Sat Jul 30 16:34:00 2022
@@ -837,11 +837,11 @@ extern _X_EXPORT int xf86CrtcConfigPriva
 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];

Reply via email to