From 4005f77c03f67f1527519969b047c599cba32e36 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Fri, 17 Feb 2023 16:34:39 +0800
Subject: [PATCH] fix CVE-2023-0494

---
 Xi/exevents.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 659816a..0cb8d78 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -575,8 +575,10 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
             memcpy(to->button->xkb_acts, from->button->xkb_acts,
                    sizeof(XkbAction));
         }
-        else
+        else {
             free(to->button->xkb_acts);
+            to->button->xkb_acts = NULL;
+        }
 
         memcpy(to->button->labels, from->button->labels,
                from->button->numButtons * sizeof(Atom));
-- 
2.20.1

