|
|
877df9f |
From 675ba81ffe268fdfeb2ec2820369cfd2d4c768c9 Mon Sep 17 00:00:00 2001
|
|
|
877df9f |
From: agoins <agoins@nvidia.com>
|
|
|
877df9f |
Date: Mon, 24 Oct 2016 15:25:53 -0700
|
|
|
877df9f |
Subject: [PATCH xserver v2] ramdac: Check sPriv != NULL in xf86CheckHWCursor()
|
|
|
877df9f |
|
|
|
877df9f |
xf86CheckHWCursor() would dereference sPriv without NULL checking it. If Option
|
|
|
877df9f |
"SWCursor" is specified, sPriv == NULL. In this case we should assume that HW
|
|
|
877df9f |
cursors are not supported.
|
|
|
877df9f |
|
|
|
877df9f |
Signed-off-by: Alex Goins <agoins@nvidia.com>
|
|
|
877df9f |
Reviewed-by: Andy Ritger <aritger@nvidia.com>
|
|
|
877df9f |
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
877df9f |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
877df9f |
---
|
|
|
877df9f |
hw/xfree86/ramdac/xf86HWCurs.c | 3 ++-
|
|
|
877df9f |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
877df9f |
|
|
|
877df9f |
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
|
|
|
877df9f |
index da2b181..5e99526 100644
|
|
|
877df9f |
--- a/hw/xfree86/ramdac/xf86HWCurs.c
|
|
|
877df9f |
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
|
|
|
877df9f |
@@ -148,7 +148,8 @@ xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr
|
|
|
877df9f |
continue;
|
|
|
877df9f |
|
|
|
877df9f |
sPriv = dixLookupPrivate(&pSlave->devPrivates, xf86CursorScreenKey);
|
|
|
877df9f |
- if (!xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr))
|
|
|
877df9f |
+ if (!sPriv ||
|
|
|
877df9f |
+ !xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr))
|
|
|
877df9f |
return FALSE;
|
|
|
877df9f |
}
|
|
|
877df9f |
return TRUE;
|
|
|
877df9f |
--
|
|
|
877df9f |
2.9.3
|
|
|
877df9f |
|