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

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