|
From: Araki K. <ara...@us...> - 2018-11-23 02:55:44
|
Hi,
From: R <0xe...@gm...>
Subject: [Mlterm-dev-en] [PATCH] crash on the '\e[21t' (report window title)
control sequence
Date: Tue, 20 Nov 2018 06:30:23 +0200
Message-ID: <CAE...@ma...>
> If the window name wasn't already set with '\e]2;TITLE\a', writing a
> '\e[21t' inside a mlterm window will cause a segmentation fault in
> vtemu/vt_parser.c:report_window_or_icon_name() when it tries to
> dereference the title variable set from vt_parser->win_name. (And it's
> probably the same problem with vt_parser->icon_name).
>
> The following patch will cause it to return an empty string in that case:
>
> diff -r a2f8558d621e vtemu/vt_parser.c
> --- a/vtemu/vt_parser.c Sun Nov 18 22:36:25 2018 +0900
> +++ b/vtemu/vt_parser.c Tue Nov 20 06:07:41 2018 +0200
> @@ -1666,6 +1666,9 @@
> title = vt_parser->icon_name;
> pre = "\x1b]L";
> }
> + if (!title) {
> + title = "";
> + }
>
> /* see parse_title() */
> src_encoding = vt_get_char_encoding("auto");
Thanks. I fixed it.
---
Araki Ken
ara...@us...
|