diff options
author | Peter Åstrand <astrand@cendio.se> | 2009-02-13 10:23:28 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-02-16 13:28:38 +1000 |
commit | ddb8d8945d1f44d16adc366b6612eef20ae813f7 (patch) | |
tree | d40a0cf5909a20f399827005336f49a2e84ed7ba /dix/main.c | |
parent | b735a4b4951b607e614682836f24d5fd86c1f7fb (diff) |
xserver: Avoid sending uninitialized padding data over the network
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/main.c')
-rw-r--r-- | dix/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dix/main.c b/dix/main.c index 1c66c8622..6a45332c3 100644 --- a/dix/main.c +++ b/dix/main.c @@ -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; |