diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-26 08:17:08 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-26 17:38:30 -0500 |
commit | 08c5a874ab97d52e215025ccd010d68fcdf14731 (patch) | |
tree | df47490305b3c01878863ee47a08a7da882b0d59 /src/nvim/spell.c | |
parent | 6f073ccbf464e2f2cd6d6855aa3f27ee1adcc20d (diff) | |
download | rneovim-08c5a874ab97d52e215025ccd010d68fcdf14731.tar.gz rneovim-08c5a874ab97d52e215025ccd010d68fcdf14731.tar.bz2 rneovim-08c5a874ab97d52e215025ccd010d68fcdf14731.zip |
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.
https://github.com/vim/vim/commit/8f130eda4747e4a4d68353cdb650f359fd01469b
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index c75a53a777..a221f3fd75 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -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; |