mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-08 11:28:03 +02:00
Valgrind fix for XStoreColor and XStoreColors.
If the "pad" field isn't set, Valgrind will report it as uninitialized memory accesses when the struct is copied into the Display's send buffer. In practice, this is (probably) harmless, but Valgrind is correct in believing it's a bug. https://bugs.freedesktop.org/attachment.cgi?id=133189 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
7d2010fec2
commit
4fe66b1c51
2 changed files with 2 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ XStoreColor(
|
|||
citem->green = def->green;
|
||||
citem->blue = def->blue;
|
||||
citem->flags = def->flags; /* do_red, do_green, do_blue */
|
||||
citem->pad = 0;
|
||||
|
||||
|
||||
UnlockDisplay(dpy);
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ XStoreColors(
|
|||
citem.green = defs[i].green;
|
||||
citem.blue = defs[i].blue;
|
||||
citem.flags = defs[i].flags;
|
||||
citem.pad = 0;
|
||||
|
||||
/* note that xColorItem doesn't contain all 16-bit quantities, so
|
||||
we can't use Data16 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue