[PATCH] render: fix crash on creation of animated cursors

Magnus Kessler Magnus.Kessler at gmx.net
Sat May 2 02:08:48 PDT 2009


With commit 57aff88c7d0761e590806d07bee1c9410680c89f the server crashes in 
AnimCursorCreate (animcursor.c:393) when creating an animated cursor. The 
underlying cause is that only cursors[1] is ever initialised in 
ProcRenderCreateAnimCursor (render.c:1860)

Signed-off-by: Magnus Kessler <Magnus.Kessler at gmx.net>

diff --git a/render/render.c b/render/render.c
index 8487b60..5622994 100644
--- a/render/render.c
+++ b/render/render.c
@@ -1857,7 +1857,7 @@ ProcRenderCreateAnimCursor (ClientPtr client)
     elt = (xAnimCursorElt *) (stuff + 1);
     for (i = 0; i < ncursor; i++)
     {
-       ret = dixLookupResourceByType((pointer *)(cursors + 1), elt->cursor,
+       ret = dixLookupResourceByType((pointer *)(cursors + i), elt->cursor,
                                      RT_CURSOR, client, DixReadAccess);
        if (ret != Success)
        {

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.x.org/archives/xorg-devel/attachments/20090502/d1664b09/attachment-0001.pgp 


More information about the xorg-devel mailing list