aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulio-b <julio.bacel@gmail.com>2023-05-26 04:13:00 +0000
committerGitHub <noreply@github.com>2023-05-26 12:13:00 +0800
commitd31f7648ecaf32426239020331d1bbe9a6f56140 (patch)
tree6b7675257c320a662173fd52dede4796e4d8a041
parenta6dd67f5b66c0ef646808422ceeac710ce144547 (diff)
downloadrneovim-d31f7648ecaf32426239020331d1bbe9a6f56140.tar.gz
rneovim-d31f7648ecaf32426239020331d1bbe9a6f56140.tar.bz2
rneovim-d31f7648ecaf32426239020331d1bbe9a6f56140.zip
fix(mkspell): prevent Unicode character overflow (#23760)
introduced in: bd22585061b6 fixes #23758
-rw-r--r--src/nvim/spellfile.c2
1 files changed, 1 insertions, 1 deletions
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) {