1 |
From c5ff57676698f19ed3a1402aef58a15552e32d27 Mon Sep 17 00:00:00 2001 |
2 |
From: Peter Hutterer <peter.hutterer@who-t.net> |
3 |
Date: Tue, 29 Nov 2022 13:24:00 +1000 |
4 |
Subject: [PATCH xserver 2/7] Xi: return an error from XI property changes if |
5 |
verification failed |
6 |
|
7 |
Both ProcXChangeDeviceProperty and ProcXIChangeProperty checked the |
8 |
property for validity but didn't actually return the potential error. |
9 |
|
10 |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> |
11 |
Acked-by: Olivier Fourdan <ofourdan@redhat.com> |
12 |
--- |
13 |
Xi/xiproperty.c | 5 +++++ |
14 |
1 file changed, 5 insertions(+) |
15 |
|
16 |
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c |
17 |
index a36f7d61df..68c362c628 100644 |
18 |
--- a/Xi/xiproperty.c |
19 |
+++ b/Xi/xiproperty.c |
20 |
@@ -902,6 +902,8 @@ ProcXChangeDeviceProperty(ClientPtr client) |
21 |
|
22 |
rc = check_change_property(client, stuff->property, stuff->type, |
23 |
stuff->format, stuff->mode, stuff->nUnits); |
24 |
+ if (rc != Success) |
25 |
+ return rc; |
26 |
|
27 |
len = stuff->nUnits; |
28 |
if (len > (bytes_to_int32(0xffffffff - sizeof(xChangeDevicePropertyReq)))) |
29 |
@@ -1141,6 +1143,9 @@ ProcXIChangeProperty(ClientPtr client) |
30 |
|
31 |
rc = check_change_property(client, stuff->property, stuff->type, |
32 |
stuff->format, stuff->mode, stuff->num_items); |
33 |
+ if (rc != Success) |
34 |
+ return rc; |
35 |
+ |
36 |
len = stuff->num_items; |
37 |
if (len > bytes_to_int32(0xffffffff - sizeof(xXIChangePropertyReq))) |
38 |
return BadLength; |
39 |
-- |
40 |
2.38.1 |
41 |
|