vim-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.
8f130eda47
This commit is contained in:
Jan Edmund Lazo
2020-01-26 08:17:08 -05:00
parent 6f073ccbf4
commit 08c5a874ab
6 changed files with 53 additions and 10 deletions

View File

@@ -2008,6 +2008,10 @@ char_u *did_set_spelllang(win_T *wp)
region = NULL;
len = (int)STRLEN(lang);
if (!valid_spellang(lang)) {
continue;
}
if (STRCMP(lang, "cjk") == 0) {
wp->w_s->b_cjk = 1;
continue;