# HG changeset patch # User Bram Moolenaar # Date 1645456503 -3600 # Node ID b10e94f21344fea9f7820a56a60cfc36f604e3d4 # Parent ec3ca4ad469459a2696958cfb7b18d9715cdec6a patch 8.2.4430: GTK: crash when using 'guiligatures' and reading from stdin Commit: https://github.com/vim/vim/commit/101979358f9addfac1414579c4191682e9e42468 Author: Amon Sha Date: Mon Feb 21 15:07:12 2022 +0000 patch 8.2.4430: GTK: crash when using 'guiligatures' and reading from stdin Problem: GTK: crash when using 'guiligatures' and reading from stdin. Solution: Make a copy of the message. (Amon Sha, closes https://github.com/vim/vim/issues/9719, closes https://github.com/vim/vim/issues/9814) diff --git a/src/fileio.c b/src/fileio.c --- a/src/fileio.c +++ b/src/fileio.c @@ -759,8 +759,13 @@ readfile( // Also write a message in the GUI window, if there is one. if (gui.in_use && !gui.dying && !gui.starting) { - p = (char_u *)_("Reading from stdin..."); - gui_write(p, (int)STRLEN(p)); + // make a copy, gui_write() may try to change it + p = vim_strsave((char_u *)_("Reading from stdin...")); + if (p != NULL) + { + gui_write(p, (int)STRLEN(p)); + vim_free(p); + } } #endif } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4430, +/**/ 4429, /**/ 4428,