fix invalid memory access in xcb_reply_contains_atom (Thanks ys)
This commit is contained in:
parent
77640da9e7
commit
62362a464d
|
@ -347,7 +347,7 @@ bool xcb_reply_contains_atom(xcb_get_property_reply_t *prop, xcb_atom_t atom) {
|
||||||
if ((atoms = xcb_get_property_value(prop)) == NULL)
|
if ((atoms = xcb_get_property_value(prop)) == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (int i = 0; i < xcb_get_property_value_length(prop); i++)
|
for (int i = 0; i < xcb_get_property_value_length(prop) / (prop->format / 8); i++)
|
||||||
if (atoms[i] == atom)
|
if (atoms[i] == atom)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue