diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-01-04 14:31:49 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-04 14:31:49 +0000 |
commit | 7b17eb4b063a234376c1ec909ee293e42cff290c (patch) | |
tree | f994c89ecf171083a5d8e5a718a21626a7ba5e08 /src/buffer.c | |
parent | f057171d8b562c72334fd7c15c89ff787358ce3a (diff) |
patch 9.0.1143: invalid memory access with bad 'statusline' valuev9.0.1143
Problem: Invalid memory access with bad 'statusline' value.
Solution: Avoid going over the NUL at the end.
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 9856898789..4016822616 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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; } |