Mercurial > vim
comparison src/filepath.c @ 27784:bfce04a99561 v8.2.4418
patch 8.2.4418: crash when using special multi-byte character
Commit: https://github.com/vim/vim/commit/5921aeb5741fc6e84c870d68c7c35b93ad0c9f87
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 19 11:20:12 2022 +0000
patch 8.2.4418: crash when using special multi-byte character
Problem: Crash when using special multi-byte character.
Solution: Don't use isalpha() for an arbitrary character.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 19 Feb 2022 12:30:04 +0100 |
parents | 9a8992489b71 |
children | d4b549180a07 |
comparison
equal
deleted
inserted
replaced
27783:59ce43efd4be | 27784:bfce04a99561 |
---|---|
3624 s = p + 1; | 3624 s = p + 1; |
3625 } | 3625 } |
3626 else if (path_end >= path + wildoff | 3626 else if (path_end >= path + wildoff |
3627 && (vim_strchr((char_u *)"*?[{~$", *path_end) != NULL | 3627 && (vim_strchr((char_u *)"*?[{~$", *path_end) != NULL |
3628 || (!p_fic && (flags & EW_ICASE) | 3628 || (!p_fic && (flags & EW_ICASE) |
3629 && isalpha(PTR2CHAR(path_end))))) | 3629 && vim_isalpha(PTR2CHAR(path_end))))) |
3630 e = p; | 3630 e = p; |
3631 if (has_mbyte) | 3631 if (has_mbyte) |
3632 { | 3632 { |
3633 len = (*mb_ptr2len)(path_end); | 3633 len = (*mb_ptr2len)(path_end); |
3634 STRNCPY(p, path_end, len); | 3634 STRNCPY(p, path_end, len); |