From cdf5bcd420e5bcf4a4a24a275d3133a4e16ce41e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 9 Jul 2012 19:12:42 -0700 Subject: Use calloc to zero fill buffers being allocated for replies & events Ensures padding bytes are zero-filled Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone --- randr/rrcrtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'randr') diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index ee29f37a3..c91c7fdf9 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -1526,7 +1526,7 @@ ProcRRGetCrtcTransform(ClientPtr client) nextra = (transform_filter_length(pending) + transform_filter_length(current)); - reply = malloc(sizeof(xRRGetCrtcTransformReply) + nextra); + reply = calloc(1, sizeof(xRRGetCrtcTransformReply) + nextra); if (!reply) return BadAlloc; -- cgit v1.2.3