Blame SOURCES/0001-XRes-Use-_XRead-instead-of-_XRead32-for-reading-pid.patch
|
|
bc13f0 |
From 3e6bdd90c604e061c71715865eb403ffdd0dd7f0 Mon Sep 17 00:00:00 2001
|
|
|
bc13f0 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
bc13f0 |
Date: Wed, 21 Oct 2020 10:03:23 -0400
|
|
|
bc13f0 |
Subject: [PATCH] XRes: Use _XRead instead of _XRead32 for reading pid
|
|
|
bc13f0 |
|
|
|
bc13f0 |
_XRead32 requires the output variable to be a long, but
|
|
|
bc13f0 |
`ReadClientValues` feeds it client->value which is a
|
|
|
bc13f0 |
32-bit allocation.
|
|
|
bc13f0 |
|
|
|
bc13f0 |
This commit changes the code to use _XRead instead, which
|
|
|
bc13f0 |
properly handles 32-bit output variables.
|
|
|
bc13f0 |
|
|
|
bc13f0 |
https://gitlab.freedesktop.org/xorg/lib/libxres/-/issues/3
|
|
|
bc13f0 |
---
|
|
|
bc13f0 |
src/XRes.c | 2 +-
|
|
|
bc13f0 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
bc13f0 |
|
|
|
bc13f0 |
diff --git a/src/XRes.c b/src/XRes.c
|
|
|
bc13f0 |
index 2bee277..90e72c9 100644
|
|
|
bc13f0 |
--- a/src/XRes.c
|
|
|
bc13f0 |
+++ b/src/XRes.c
|
|
|
bc13f0 |
@@ -256,7 +256,7 @@ static Bool ReadClientValues(
|
|
|
bc13f0 |
_XRead32 (dpy, &value, 4);
|
|
|
bc13f0 |
client->length = value;
|
|
|
bc13f0 |
client->value = malloc(client->length);
|
|
|
bc13f0 |
- _XRead32 (dpy, client->value, client->length);
|
|
|
bc13f0 |
+ _XRead (dpy, client->value, client->length);
|
|
|
bc13f0 |
}
|
|
|
bc13f0 |
return True;
|
|
|
bc13f0 |
}
|
|
|
bc13f0 |
--
|
|
|
bc13f0 |
2.28.0
|
|
|
bc13f0 |
|