From: Po Lu Date: Sun, 20 Mar 2022 04:51:46 +0000 (+0800) Subject: Check list tail properly in x-begin-drag X-Git-Tag: emacs-29.0.90~1931^2~1035 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b19b9cbe514a8b75ec20e0056cba91b465057614;p=emacs.git Check list tail properly in x-begin-drag * src/xfns.c (Fx_begin_drag): Check that TARGETS is actually a proper list. * src/xterm.c (x_dnd_update_state): Remove debugging code. --- diff --git a/src/xfns.c b/src/xfns.c index b5d0b2c54e8..9d30f2adee1 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -6620,10 +6620,11 @@ instead. */) int ntargets = 0; char *target_names[2048]; Atom *target_atoms; - Lisp_Object lval; + Lisp_Object lval, original; Atom xaction; CHECK_LIST (targets); + original = targets; for (; CONSP (targets); targets = XCDR (targets)) { @@ -6638,6 +6639,8 @@ instead. */) error ("Too many targets"); } + CHECK_LIST_END (targets, original); + if (NILP (action) || EQ (action, QXdndActionCopy)) xaction = FRAME_DISPLAY_INFO (f)->Xatom_XdndActionCopy; else if (EQ (action, QXdndActionMove)) diff --git a/src/xterm.c b/src/xterm.c index 3e7b51e4db3..01840569fef 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10606,8 +10606,6 @@ x_dnd_update_state (struct x_display_info *dpyinfo) unsigned int dummy_mask; Window dummy, dummy_child, target; - puts ("us"); - if (XQueryPointer (dpyinfo->display, dpyinfo->root_window, &dummy, &dummy_child,