aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/spell.c2
1 files changed, 2 insertions, 0 deletions
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 <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
@@ -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)