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

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