xserver: Avoid sending uninitialized padding data over the network

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Åstrand
2009-02-13 10:23:28 +01:00
committed by Peter Hutterer
parent b735a4b495
commit ddb8d8945d
24 changed files with 86 additions and 16 deletions

View File

@@ -489,8 +489,9 @@ CreateConnectionBlock(void)
sizesofar = 0;
char *pBuf;
/* Leave off the ridBase and ridMask, these must be sent with
memset(&setup, 0, sizeof(xConnSetup));
/* Leave off the ridBase and ridMask, these must be sent with
connection */
setup.release = VendorRelease;
@@ -529,7 +530,8 @@ CreateConnectionBlock(void)
sizesofar += i;
while (--i >= 0)
*pBuf++ = 0;
memset(&format, 0, sizeof(xPixmapFormat));
for (i=0; i<screenInfo.numPixmapFormats; i++)
{
format.depth = screenInfo.formats[i].depth;
@@ -541,7 +543,9 @@ CreateConnectionBlock(void)
}
connBlockScreenStart = sizesofar;
for (i=0; i<screenInfo.numScreens; i++)
memset(&depth, 0, sizeof(xDepth));
memset(&visual, 0, sizeof(xVisualType));
for (i=0; i<screenInfo.numScreens; i++)
{
ScreenPtr pScreen;
DepthPtr pDepth;