0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1143: invalid memory access with bad 'statusline' value

Problem:    Invalid memory access with bad 'statusline' value.
Solution:   Avoid going over the NUL at the end.
This commit is contained in:
Bram Moolenaar
2023-01-04 14:31:49 +00:00
parent f057171d8b
commit 7b17eb4b06
3 changed files with 11 additions and 0 deletions

View File

@@ -4617,6 +4617,8 @@ build_stl_str_hl(
#endif
if (vim_strchr(STL_ALL, *s) == NULL)
{
if (*s == NUL) // can happen with "%0"
break;
s++;
continue;
}