[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 6ed1994d27: Prevent crashes from illegal locale coding system
From: |
Eli Zaretskii |
Subject: |
Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems |
Date: |
Thu, 17 Feb 2022 08:31:26 +0200 |
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 17 Feb 2022 08:45:19 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > 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.
>
> How about something like this?
>
> diff --git a/src/xterm.c b/src/xterm.c
> index b55a54b945..53d89240f1 100644
> --- 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)))
> + coding_system = Qraw_text;
> +#endif
Yes, that's what I had in mind.
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, (continued)
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Po Lu, 2022/02/15
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Po Lu, 2022/02/16
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Eli Zaretskii, 2022/02/16
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Po Lu, 2022/02/16
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Eli Zaretskii, 2022/02/16
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Po Lu, 2022/02/16
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Eli Zaretskii, 2022/02/16
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Po Lu, 2022/02/16
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Eli Zaretskii, 2022/02/16
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Po Lu, 2022/02/16
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems,
Eli Zaretskii <=
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Po Lu, 2022/02/17
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Eli Zaretskii, 2022/02/17
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Po Lu, 2022/02/17