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

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