mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix(mkspell): prevent Unicode character overflow (#23760)
introduced in: bd22585061
fixes #23758
This commit is contained in:
parent
a6dd67f5b6
commit
d31f7648ec
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user