0
0
mirror of https://github.com/vim/vim.git synced 2025-10-10 06:24:10 -04:00

patch 8.1.1143: may pass weird strings to file name expansion

Problem:    May pass weird strings to file name expansion.
Solution:   Check for matching characters.  Disallow control characters.
This commit is contained in:
Bram Moolenaar
2019-04-10 22:15:19 +02:00
parent 3fb01a53c6
commit 8f130eda47
7 changed files with 57 additions and 11 deletions

View File

@@ -2308,11 +2308,14 @@ did_set_spelllang(win_T *wp)
/* Loop over comma separated language names. */
for (splp = spl_copy; *splp != NUL; )
{
/* Get one language name. */
// Get one language name.
copy_option_part(&splp, lang, MAXWLEN, ",");
region = NULL;
len = (int)STRLEN(lang);
if (!valid_spellang(lang))
continue;
if (STRCMP(lang, "cjk") == 0)
{
wp->w_s->b_cjk = 1;