Commit cba5a10f authored by Alex Goins's avatar Alex Goins Committed by Keith Packard

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's avatarAlex Goins <agoins@nvidia.com>
Reviewed-by: default avatarAndy Ritger <aritger@nvidia.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 5cb32833
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment