diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 38d52a7f53..d52961b799 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -284,6 +284,7 @@ // stored as an offset to the previous number in as // few bytes as possible, see offset2bytes()) +#include #include #include #include @@ -2096,6 +2097,7 @@ spell_move_to ( buflen = len + MAXWLEN + 2; buf = xmalloc(buflen); } + assert(buf && buflen >= len + MAXWLEN + 2); // In first line check first word for Capital. if (lnum == 1)