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 <[email protected]> --- randr/rroutput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/randr/rroutput.c b/randr/rroutput.c index a8efec409..647f19a52 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -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; } -- 2.14.1.439.g647b9b4702 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
