mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 19:50:03 +01:00
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@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
5cb3283386
commit
cba5a10fd9
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue