randr: rrGetScreenResources: initialize memory

Similarly to bb766ef112, 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 fb5ee77b91)
This commit is contained in:
Giuseppe Bilotta 2017-11-09 10:21:19 +01:00 committed by Adam Jackson
parent ece2e82ebf
commit a4bd27bdc8

View File

@ -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;