emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c16b296939: Fix crash when windows are destroyed by faulty client


From: Po Lu
Subject: master c16b296939: Fix crash when windows are destroyed by faulty clients
Date: Sat, 26 Mar 2022 00:21:04 -0400 (EDT)

branch: master
commit c16b296939c9048c6031ce4cb66e5903488fd063
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix crash when windows are destroyed by faulty clients
    
    * src/xterm.c (x_dnd_compute_toplevels): Make sure
    property_reply is non-NULL before testing its format and length.
---
 src/xterm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index e20efd67c7..7edec2cd40 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1025,8 +1025,9 @@ x_dnd_compute_toplevels (struct x_display_info *dpyinfo)
          free (error);
        }
 
-      if (xcb_get_property_value_length (property_reply) != 8
-         || property_reply->format != 32)
+      if (property_reply
+         && (xcb_get_property_value_length (property_reply) != 8
+             || property_reply->format != 32))
        rc = false;
 
       geometry_reply = xcb_get_geometry_reply (dpyinfo->xcb_connection,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]