1
0
forked from aniani/vim

patch 8.1.1824: crash when correctly spelled word is very long

Problem:    Crash when correctly spelled word is very long. (Ben Kraft)
Solution:   Check word length before copying. (closes #4778)
This commit is contained in:
Bram Moolenaar
2019-08-06 22:48:02 +02:00
parent d7663c22c6
commit 5bcc5a1ff9
3 changed files with 17 additions and 0 deletions

View File

@@ -2073,6 +2073,8 @@ count_common_word(
if (len == -1)
p = word;
else if (len >= MAXWLEN)
return;
else
{
vim_strncpy(buf, word, len);