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:
@@ -2073,6 +2073,8 @@ count_common_word(
|
||||
|
||||
if (len == -1)
|
||||
p = word;
|
||||
else if (len >= MAXWLEN)
|
||||
return;
|
||||
else
|
||||
{
|
||||
vim_strncpy(buf, word, len);
|
||||
|
Reference in New Issue
Block a user