diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-13 13:08:14 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-13 13:08:14 +0000 |
commit | de05bb25733c3319e18dca44e9b59c6ee389eb26 (patch) | |
tree | e2f5ea4506ce6d42ad2cbe89b5e32f3713bed510 /src/drawscreen.c | |
parent | 54598066ca4cfaf0761aedf47e4ba9844674791e (diff) | |
download | vim-git-de05bb25733c3319e18dca44e9b59c6ee389eb26.tar.gz |
patch 8.2.4074: going over the end of NameBuffv8.2.4074
Problem: Going over the end of NameBuff.
Solution: Check length when appending a space.
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r-- | src/drawscreen.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c index 28a207295..453ca91c3 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -462,12 +462,13 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED) p = NameBuff; len = (int)STRLEN(p); - if (bt_help(wp->w_buffer) + if ((bt_help(wp->w_buffer) #ifdef FEAT_QUICKFIX - || wp->w_p_pvw + || wp->w_p_pvw #endif - || bufIsChanged(wp->w_buffer) - || wp->w_buffer->b_p_ro) + || bufIsChanged(wp->w_buffer) + || wp->w_buffer->b_p_ro) + && len < MAXPATHL - 1) *(p + len++) = ' '; if (bt_help(wp->w_buffer)) { |