From d31f7648ecaf32426239020331d1bbe9a6f56140 Mon Sep 17 00:00:00 2001 From: julio-b Date: Fri, 26 May 2023 04:13:00 +0000 Subject: [PATCH] fix(mkspell): prevent Unicode character overflow (#23760) introduced in: bd22585061b6 fixes #23758 --- src/nvim/spellfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c index 5e4a429cc7..e81cebe18a 100644 --- a/src/nvim/spellfile.c +++ b/src/nvim/spellfile.c @@ -3131,7 +3131,7 @@ static int spell_read_dic(spellinfo_T *spin, char *fname, afffile_T *affile) // Remove CR, LF and white space from the end. White space halfway through // the word is kept to allow multi-word terms like "et al.". l = (int)strlen(line); - while (l > 0 && line[l - 1] <= ' ') { + while (l > 0 && (uint8_t)line[l - 1] <= ' ') { l--; } if (l == 0) {