randr: rrGetScreenResources: initialize memory
Similarly tobb766ef112
, 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 commitfb5ee77b91
)
This commit is contained in:
parent
ece2e82ebf
commit
a4bd27bdc8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user