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

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