[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ca5f259cff: Fix crash when retrieving window property with invali
From: |
Po Lu |
Subject: |
master ca5f259cff: Fix crash when retrieving window property with invalid atom data |
Date: |
Sat, 2 Apr 2022 08:13:53 -0400 (EDT) |
branch: master
commit ca5f259cff93ad7fc4d5e70319412420affb6d17
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix crash when retrieving window property with invalid atom data
This happens when dropping files from dtfile, which somehow puts
non-atom stuff in window properties of type ATOM_PAIR.
* src/xselect.c (x_atom_to_symbol): Catch errors around
XGetAtomName.
---
src/xselect.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/xselect.c b/src/xselect.c
index 76a2f9f507..7719876884 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -285,7 +285,9 @@ x_atom_to_symbol (struct x_display_info *dpyinfo, Atom atom)
return QNULL;
block_input ();
+ x_catch_errors (dpyinfo->display);
str = XGetAtomName (dpyinfo->display, atom);
+ x_uncatch_errors ();
unblock_input ();
TRACE1 ("XGetAtomName --> %s", str);
if (! str) return Qnil;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ca5f259cff: Fix crash when retrieving window property with invalid atom data,
Po Lu <=