mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 11:50:06 +01:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue