summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2017-11-09 10:21:19 +0100
committerAdam Jackson <ajax@redhat.com>2017-11-20 16:13:17 -0500
commitfb5ee77b91a93e27801006be8ee34d27984e7fa6 (patch)
tree99dca693bd8210bbbf74a110464e5eae435a7f58 /randr
parent307c124d6bcfe26057767b2c0990dc9ac66b9c93 (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>
Diffstat (limited to 'randr')
-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;