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

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