diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-06-10 08:20:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-10 08:20:55 +0800 |
| commit | 7a58cf4b962cdd7811723681d78e40a26ecb6218 (patch) | |
| tree | 8589186e1699c8615b81f1260cac5462bb3420ef /runtime/lua/vim/provider/python.lua | |
| parent | 78e2f62516750138e00bf519c1fb48bb92ef236e (diff) | |
| download | rneovim-7a58cf4b962cdd7811723681d78e40a26ecb6218.tar.gz rneovim-7a58cf4b962cdd7811723681d78e40a26ecb6218.tar.bz2 rneovim-7a58cf4b962cdd7811723681d78e40a26ecb6218.zip | |
vim-patch:9.1.1443: potential buffer underflow in insertchar() (#34408)
Problem: potential buffer underflow in insertchar()
Solution: verify that end_len is larger than zero
(jinyaoguo)
When parsing the end-comment leader, end_len can be zero if
copy_option_part() writes no characters. The existing check
unconditionally accessed lead_end[end_len-1], causing potential
underflow when end_len == 0.
This change adds an end_len > 0 guard to ensure we only index lead_end
if there is at least one character.
closes: vim/vim#17476
https://github.com/vim/vim/commit/82a96e3dc0ee8f45bb0c1fe17a0cec1db7582e8f
Co-authored-by: jinyaoguo <guo846@purdue.edu>
Diffstat (limited to 'runtime/lua/vim/provider/python.lua')
0 files changed, 0 insertions, 0 deletions