diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-04-10 22:15:19 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-04-10 22:15:19 +0200 |
commit | 8f130eda4747e4a4d68353cdb650f359fd01469b (patch) | |
tree | 0c07f9b0d8203788f1929ad8383839020f1f41cb /src/spell.c | |
parent | 3fb01a53c685d8d7e7bd83c33500de80aed0d7c8 (diff) | |
download | vim-git-8f130eda4747e4a4d68353cdb650f359fd01469b.tar.gz |
patch 8.1.1143: may pass weird strings to file name expansionv8.1.1143
Problem: May pass weird strings to file name expansion.
Solution: Check for matching characters. Disallow control characters.
Diffstat (limited to 'src/spell.c')
-rw-r--r-- | src/spell.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/spell.c b/src/spell.c index ae4db12c0..947bee518 100644 --- a/src/spell.c +++ b/src/spell.c @@ -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; |