commit | 5bcc5a1ff94bbab1b175e35a72e3df974106b393 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Aug 06 22:48:02 2019 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Aug 06 22:48:02 2019 +0200 |
tree | b90a4c3a1cae32cc2e68942d6da1802cd827f2b1 | |
parent | d7663c22c6c1ff0f86b81371586fbc851d3a3e9e [diff] [blame] |
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)
diff --git a/src/spell.c b/src/spell.c index dda81d9..83c232c 100644 --- a/src/spell.c +++ b/src/spell.c
@@ -2073,6 +2073,8 @@ if (len == -1) p = word; + else if (len >= MAXWLEN) + return; else { vim_strncpy(buf, word, len);