From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems
Date: Wed, 16 Feb 2022 16:05:34 +0200 [thread overview]
Message-ID: <834k4y3o0h.fsf@gnu.org> (raw)
In-Reply-To: <877d9vudxy.fsf@yahoo.com> (message from Po Lu on Wed, 16 Feb 2022 21:40:57 +0800)
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Wed, 16 Feb 2022 21:40:57 +0800
>
> --- a/src/xterm.c
> +++ b/src/xterm.c
> @@ -8734,6 +8734,15 @@ handle_one_xevent (struct x_display_info *dpyinfo,
> {
> /* Decode the input data. */
>
> +#ifdef HAVE_GLIB
> + /* If this isn't done in a build with GLib (usually
> + with GTK), then the resulting signal in
> + `setup_coding_system' will cause Emacs to
> + crash. */
> + if (NILP (Fcoding_system_p (coding_system)))
> + goto done_keysym;
> +#endif
> +
> /* The input should be decoded with `coding_system'
> which depends on which X*LookupString function
> we used just above and the locale. */
This isn't right, IMO. You should decode using Qraw_text in the
problematic case. Dropping the bytes on the floor is too radical,
certainly for the release branch.
next prev parent reply other threads:[~2022-02-16 14:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-13 13:00 master 6ed1994d27: Prevent crashes from illegal locale coding systems Eli Zaretskii
2022-02-13 13:16 ` Po Lu
2022-02-13 13:45 ` Eli Zaretskii
2022-02-14 0:51 ` Po Lu
2022-02-14 3:32 ` Eli Zaretskii
2022-02-14 4:46 ` Po Lu
2022-02-14 14:07 ` Eli Zaretskii
[not found] ` <87iltheyeu.fsf@yahoo.com>
[not found] ` <83wnhwol2o.fsf@gnu.org>
[not found] ` <87tud0ybhj.fsf@yahoo.com>
[not found] ` <837d9w450e.fsf@gnu.org>
2022-02-15 13:55 ` Po Lu
2022-02-15 14:07 ` Eli Zaretskii
2022-02-16 0:49 ` Po Lu
2022-02-16 2:38 ` Po Lu
2022-02-16 5:12 ` Po Lu
2022-02-16 12:22 ` Eli Zaretskii
2022-02-16 12:33 ` Po Lu
2022-02-16 12:38 ` Eli Zaretskii
2022-02-16 13:05 ` Po Lu
2022-02-16 13:33 ` Eli Zaretskii
2022-02-16 13:40 ` Po Lu
2022-02-16 14:05 ` Eli Zaretskii [this message]
2022-02-17 0:45 ` Po Lu
2022-02-17 6:31 ` Eli Zaretskii
2022-02-17 6:51 ` Po Lu
2022-02-17 7:23 ` Eli Zaretskii
2022-02-17 7:44 ` Po Lu
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=834k4y3o0h.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).