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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user