1
0
xorg-x11-server/U_Xi-fix-potential-use-after-free-in-DeepCopyPointerCl.patch

21 lines
598 B
Diff
Raw Normal View History

@@ -, +, @@
DeepCopyPointerClasses
---
Xi/exevents.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/Xi/exevents.c
+++ a/Xi/exevents.c
@@ -619,8 +619,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));
--