xserver: Branch 'server-1.4-branch'
Jesse Barnes
jbarnes at kemper.freedesktop.org
Tue Jul 29 18:41:12 PDT 2008
hw/xfree86/modes/xf86Rotate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit ff49f5944d06b17fb904c4f64b8660aab60d8d0d
Author: Alex Deucher <alex at samba.(none)>
Date: Thu Jan 3 22:53:36 2008 -0500
Fix potential crasher in xf86CrtcRotate()
xf86CrtcRotate() is called by randr 1.2 drivers via xf86CrtcSetMode() or xf86SetDesiredModes()
during ScreenInit() at which point pScrn->pScreen is not set. If a user specifies a rotation
in their config file pScrn->pScreen is dereferenced and boom.
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index dd0e659..e2d6295 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -494,7 +494,8 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
{
ScrnInfoPtr pScrn = crtc->scrn;
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- ScreenPtr pScreen = pScrn->pScreen;
+ /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
+ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
PictTransform crtc_to_fb, fb_to_crtc;
PictureTransformIdentity (&crtc_to_fb);
More information about the xorg-commit
mailing list