patch 8.2.1521: reading past end of buffer when reading spellfile
Problem: Reading past end of buffer when reading spellfile. (Yegappan
Lakshmanan)
Solution: Store the byte length and check for it.
diff --git a/src/spell.h b/src/spell.h
index b444145..7e4f813 100644
--- a/src/spell.h
+++ b/src/spell.h
@@ -66,6 +66,7 @@
int sl_add; // TRUE if it's a .add file.
char_u *sl_fbyts; // case-folded word bytes
+ long sl_fbyts_len; // length of sl_fbyts
idx_T *sl_fidxs; // case-folded word indexes
char_u *sl_kbyts; // keep-case word bytes
idx_T *sl_kidxs; // keep-case word indexes