diff options
author | Ray Strode <rstrode@redhat.com> | 2020-10-21 10:03:23 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2020-10-21 11:18:49 -0400 |
commit | 3e6bdd90c604e061c71715865eb403ffdd0dd7f0 (patch) | |
tree | feecbbeeb30acac0a5805e8564ab018de71255e2 | |
parent | 97d312e5fd9b4b97e3f50c899a40325768f246a5 (diff) |
XRes: Use _XRead instead of _XRead32 for reading pid
_XRead32 requires the output variable to be a long, but
`ReadClientValues` feeds it client->value which is a
32-bit allocation.
This commit changes the code to use _XRead instead, which
properly handles 32-bit output variables.
https://gitlab.freedesktop.org/xorg/lib/libxres/-/issues/3
-rw-r--r-- | src/XRes.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -256,7 +256,7 @@ static Bool ReadClientValues( _XRead32 (dpy, &value, 4); client->length = value; client->value = malloc(client->length); - _XRead32 (dpy, client->value, client->length); + _XRead (dpy, client->value, client->length); } return True; } |