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