On Saturday, 2017-11-04 23:06:29 +0100, Giuseppe Bilotta wrote: > 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.)
This sounds like the right fix, but I don't know enough to be sure. The rest of the series is Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com> > > Signed-off-by: Giuseppe Bilotta <giuseppe.bilo...@gmail.com> > --- > 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 > _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel