Commit 4fe66b1c authored by Ryan C. Gordon's avatar Ryan C. Gordon Committed by Alan Coopersmith

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. Alan Coopersmith's avatarAlan Coopersmith <>
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <>
parent 7d2010fe
......@@ -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;
......@@ -53,6 +53,7 @@ XStoreColors( = defs[i].green; = 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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment