|
|
26c1df |
From cb260ba95d2bb1ae98b05e289d1b7947ac409230 Mon Sep 17 00:00:00 2001
|
|
|
26c1df |
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
26c1df |
Date: Tue, 29 Nov 2022 13:24:00 +1000
|
|
|
26c1df |
Subject: [PATCH xserver 2/7] Xi: return an error from XI property changes if
|
|
|
26c1df |
verification failed
|
|
|
26c1df |
|
|
|
26c1df |
Both ProcXChangeDeviceProperty and ProcXIChangeProperty checked the
|
|
|
26c1df |
property for validity but didn't actually return the potential error.
|
|
|
26c1df |
|
|
|
26c1df |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
26c1df |
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
26c1df |
---
|
|
|
26c1df |
Xi/xiproperty.c | 5 +++++
|
|
|
26c1df |
1 file changed, 5 insertions(+)
|
|
|
26c1df |
|
|
|
26c1df |
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
|
|
|
26c1df |
index a36f7d61df..68c362c628 100644
|
|
|
26c1df |
--- a/Xi/xiproperty.c
|
|
|
26c1df |
+++ b/Xi/xiproperty.c
|
|
|
26c1df |
@@ -902,6 +902,8 @@ ProcXChangeDeviceProperty(ClientPtr client)
|
|
|
26c1df |
|
|
|
26c1df |
rc = check_change_property(client, stuff->property, stuff->type,
|
|
|
26c1df |
stuff->format, stuff->mode, stuff->nUnits);
|
|
|
26c1df |
+ if (rc != Success)
|
|
|
26c1df |
+ return rc;
|
|
|
26c1df |
|
|
|
26c1df |
len = stuff->nUnits;
|
|
|
26c1df |
if (len > (bytes_to_int32(0xffffffff - sizeof(xChangeDevicePropertyReq))))
|
|
|
26c1df |
@@ -1141,6 +1143,9 @@ ProcXIChangeProperty(ClientPtr client)
|
|
|
26c1df |
|
|
|
26c1df |
rc = check_change_property(client, stuff->property, stuff->type,
|
|
|
26c1df |
stuff->format, stuff->mode, stuff->num_items);
|
|
|
26c1df |
+ if (rc != Success)
|
|
|
26c1df |
+ return rc;
|
|
|
26c1df |
+
|
|
|
26c1df |
len = stuff->num_items;
|
|
|
26c1df |
if (len > bytes_to_int32(0xffffffff - sizeof(xXIChangePropertyReq)))
|
|
|
26c1df |
return BadLength;
|
|
|
26c1df |
--
|
|
|
26c1df |
2.38.1
|
|
|
26c1df |
|