all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 51701@debbugs.gnu.org
Subject: bug#51701: 29.0.50; [PATCH] Make kill_frame_xwidget_views safe
Date: Tue, 09 Nov 2021 14:33:04 +0800	[thread overview]
Message-ID: <87pmr9alen.fsf@yahoo.com> (raw)
In-Reply-To: 87pmr9alen.fsf.ref@yahoo.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Make-kill_frame_xwidget_views-safe.patch --]
[-- Type: text/x-patch, Size: 921 bytes --]

From e1a231961c36a3a5d1229aa5268b4515bd6aef31 Mon Sep 17 00:00:00 2001
From: Po Lu <luangruo@yahoo.com>
Date: Tue, 9 Nov 2021 14:31:12 +0800
Subject: [PATCH] Make `kill_frame_xwidget_views' safe

This makes kill_frame_xwidget_views still work even if the user
injects nonsense into `xwidget-view-list'.

* src/xwidget.c (kill_frame_xwidget_views): Check XWIDGET_VIEW_P.
---
 src/xwidget.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xwidget.c b/src/xwidget.c
index 614eb46d93..90178f441d 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -2388,7 +2388,8 @@ kill_frame_xwidget_views (struct frame *f)
   for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail);
        tail = XCDR (tail))
     {
-      if (XXWIDGET_VIEW (XCAR (tail))->frame == f)
+      if (XWIDGET_VIEW_P (XCAR (tail))
+	  && XXWIDGET_VIEW (XCAR (tail))->frame == f)
 	rem = Fcons (XCAR (tail), rem);
     }
 
-- 
2.31.1


[-- Attachment #2: Type: text/plain, Size: 9 bytes --]


Thanks.

       reply	other threads:[~2021-11-09  6:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87pmr9alen.fsf.ref@yahoo.com>
2021-11-09  6:33 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-11-09  6:44   ` bug#51701: 29.0.50; [PATCH] Make kill_frame_xwidget_views safe Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmr9alen.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=51701@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.