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