diff options
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/xtest.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c index 241445759..e659b4154 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -118,6 +118,10 @@ ProcXTestCompareCursor(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; + + if (!ptr) + return BadAccess; + if (stuff->cursor == None) pCursor = NullCursor; else if (stuff->cursor == XTestCurrentCursor) @@ -307,9 +311,15 @@ ProcXTestFakeInput(ClientPtr client) return BadValue; } + /* Technically the protocol doesn't allow for BadAccess here but + * this can only happen when all MDs are disabled. */ + if (!dev) + return BadAccess; + dev = GetXTestDevice(dev); } + /* If the event has a time set, wait for it to pass */ if (ev->u.keyButtonPointer.time) { TimeStamp activateTime; |