diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-04-21 15:51:20 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-04-27 15:50:26 +1000 |
commit | af170a4ab76d33254dd4e54a33bb410fa1624739 (patch) | |
tree | ee90d0a9c7485c24bdbcf6e7aef2e674cae79747 /Xext | |
parent | bac1c5f1be4588b2b1eb646ee98a5442e1b767d5 (diff) |
Xext: only update the sprite on pointer events.
A call to miPointerUpdateSprite for the XTEST keyboard may result in a
NULL pointer dereference in miDCPutUpCursor() when the save buffer is NULL.
XTS test case: Xlib 11 KeymapNotify
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/xtest.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c index a1aacc4cd..99b6711f2 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -184,6 +184,7 @@ ProcXTestFakeInput(ClientPtr client) int i; int base = 0; int flags = 0; + int need_ptr_update = 1; nev = (stuff->length << 2) - sizeof(xReq); if ((nev % sizeof(xEvent)) || !nev) @@ -388,6 +389,8 @@ ProcXTestFakeInput(ClientPtr client) client->errorValue = ev->u.u.detail; return BadValue; } + + need_ptr_update = 0; break; case MotionNotify: if (!dev->valuator) @@ -452,7 +455,8 @@ ProcXTestFakeInput(ClientPtr client) for (i = 0; i < nevents; i++) mieqProcessDeviceEvent(dev, (InternalEvent*)(xtest_evlist+i)->event, NULL); - miPointerUpdateSprite(dev); + if (need_ptr_update) + miPointerUpdateSprite(dev); return client->noClientException; } |