Blame SOURCES/0002-Xi-return-an-error-from-XI-property-changes-if-verif.patch

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