http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=d9e079d2a385203fdd18d958cfc19d759cab4ba8 Zero out client devPrivates on allocation. author Eamon Walsh Fri, 22 Dec 2006 18:07:09 +0000 (13:07 -0500) committer Eamon Walsh Fri, 22 Dec 2006 18:07:09 +0000 (13:07 -0500) commit d9e079d2a385203fdd18d958cfc19d759cab4ba8 tree 20548a2b4ab268c5a32c5883f3d06816c9f5d43e tree parent e437f357b6850a6c87ca6696870b3abd40e5b8ed commit | commitdiff Zero out client devPrivates on allocation. --- xorg-server-1.2.0.orig/dix/dispatch.c 2007-03-18 21:43:21.000000000 +0100 +++ xorg-server-1.2.0/dix/dispatch.c 2007-03-18 22:00:24.000000000 +0100 @@ -3683,20 +3683,22 @@ ppriv = (DevUnion *)(client + 1); else { ppriv = (DevUnion *)xalloc(totalClientSize - sizeof(ClientRec)); if (!ppriv) return 0; } client->devPrivates = ppriv; sizes = clientPrivateSizes; ptr = (char *)(ppriv + clientPrivateLen); + if (ppriv) + bzero(ppriv, totalClientSize - sizeof(ClientRec)); for (i = clientPrivateLen; --i >= 0; ppriv++, sizes++) { if ( (size = *sizes) ) { ppriv->ptr = (pointer)ptr; ptr += size; } else ppriv->ptr = (pointer)NULL; }