From ddb8d8945d1f44d16adc366b6612eef20ae813f7 Mon Sep 17 00:00:00 2001 From: Peter Åstrand Date: Fri, 13 Feb 2009 10:23:28 +0100 Subject: xserver: Avoid sending uninitialized padding data over the network Signed-off-by: Peter Hutterer --- render/render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'render') diff --git a/render/render.c b/render/render.c index 658b17081..abd0a68fa 100644 --- a/render/render.c +++ b/render/render.c @@ -266,6 +266,7 @@ ProcRenderQueryVersion (ClientPtr client) pRenderClient->minor_version = stuff->minorVersion; REQUEST_SIZE_MATCH(xRenderQueryVersionReq); + memset(&rep, 0, sizeof(xRenderQueryVersionReply)); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -363,7 +364,7 @@ ProcRenderQueryPictFormats (ClientPtr client) ndepth * sizeof (xPictDepth) + nvisual * sizeof (xPictVisual) + numSubpixel * sizeof (CARD32)); - reply = (xRenderQueryPictFormatsReply *) xalloc (rlength); + reply = (xRenderQueryPictFormatsReply *) xcalloc (1, rlength); if (!reply) return BadAlloc; reply->type = X_Reply; -- cgit v1.2.3