[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: |
Wed, 16 Feb 2022 16:05:34 +0200 |
> 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.
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, (continued)
- Re: master 6ed1994d27: Prevent crashes from illegal locale coding systems, Eli Zaretskii, 2022/02/15
- 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/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 <=
- 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/17
- 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