xserver: Branch 'master'
Keith Packard
keithp at kemper.freedesktop.org
Fri Oct 28 15:17:54 UTC 2016
hw/xfree86/ramdac/xf86HWCurs.c | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit cba5a10fd93310702cad9dbe1e6d48da99f5552f
Author: Alex Goins <agoins at nvidia.com>
Date: Wed Oct 26 11:03:49 2016 -0700
ramdac: Check sPriv != NULL in xf86CheckHWCursor()
xf86CheckHWCursor() would dereference sPriv without NULL checking it. If Option
"SWCursor" is specified, sPriv == NULL. In this case we should assume that HW
cursors are not supported.
Signed-off-by: Alex Goins <agoins at nvidia.com>
Reviewed-by: Andy Ritger <aritger at nvidia.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
index da2b181..4481320 100644
--- a/hw/xfree86/ramdac/xf86HWCurs.c
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
@@ -148,6 +148,10 @@ xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr
continue;
sPriv = dixLookupPrivate(&pSlave->devPrivates, xf86CursorScreenKey);
+ if (!sPriv) /* NULL if Option "SWCursor", possibly other conditions */
+ return FALSE;
+
+ /* FALSE if HWCursor not supported by slave */
if (!xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr))
return FALSE;
}
More information about the xorg-commit
mailing list