summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2017-11-09 10:21:19 +0100
committerAdam Jackson <ajax@redhat.com>2017-12-13 10:07:32 -0500
commita4bd27bdc8e3569ffa67c1105a2e5cdf0f3de683 (patch)
tree2caa57cf61e79e26c4745be0ff5e57fbb950ada0
parentece2e82ebf597ffda44b4753aa5cb7f5e1d97480 (diff)
randr: rrGetScreenResources: initialize memory
Similarly to bb766ef11227bd8c71ac65845d1930edd0eda40d, ensure that the extra padding is set to 0. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> (cherry picked from commit fb5ee77b91a93e27801006be8ee34d27984e7fa6)
-rw-r--r--randr/rrscreen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index d6c499580..0c70b28dd 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -558,7 +558,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
extraLen = rep.length << 2;
if (extraLen) {
- extra = malloc(extraLen);
+ extra = calloc(1, extraLen);
if (!extra) {
free(modes);
return BadAlloc;