randr: ProcRRGetOutputInfo: initialize memory
Running Xephyr under valgrind reveals that we're sending some uninitialized memory over the wire (particularly, the leftover padding that comes from rounding extraLen to the next 32-bit multiple). Solve by calloc()ing the memory instead of malloc()ing (the alternative would be to memset just the padding, but I'm not sure it's more convenient.) Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
6828645916
commit
bb766ef112
|
@ -459,7 +459,7 @@ ProcRRGetOutputInfo(ClientPtr client)
|
|||
|
||||
if (extraLen) {
|
||||
rep.length += bytes_to_int32(extraLen);
|
||||
extra = malloc(extraLen);
|
||||
extra = calloc(1, extraLen);
|
||||
if (!extra)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user