From b6ddf72bf16960908f9ac43ed763aca621722984 Mon Sep 17 00:00:00 2001 From: Julio B Date: Fri, 26 May 2023 03:48:04 +0300 Subject: [PATCH] fix(mkspell): prevent Unicode character overflow introduced in: bd22585061b6 fixes #23758 (cherry picked from commit 007ce3a114f721ce31cb71a5c100b241042064a3) --- 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 e66b9027f7..499a1fba0a 100644 --- a/src/nvim/spellfile.c +++ b/src/nvim/spellfile.c @@ -3127,7 +3127,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) {