diff options
author | vanaigr <vanaigranov@gmail.com> | 2024-09-03 08:01:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-03 06:01:42 -0700 |
commit | d1d7d5468091fc71fb85c090da87253efdfcdf08 (patch) | |
tree | 404b0db12463d37978d1db87a74aaae74ae48d3c /runtime/lua/vim/shared.lua | |
parent | ceddaedfadae80996fb4852bfca86fe8929ab454 (diff) | |
download | rneovim-d1d7d5468091fc71fb85c090da87253efdfcdf08.tar.gz rneovim-d1d7d5468091fc71fb85c090da87253efdfcdf08.tar.bz2 rneovim-d1d7d5468091fc71fb85c090da87253efdfcdf08.zip |
fix(api): nvim_buf_get_text() crashes with large negative column #28740
Problem:
crash when calling nvim_buf_get_text() with a large negative start_col:
call nvim_buf_get_text(0, 0, -123456789, 0, 0, {})
Solution:
clamp start_col after subtracting it from the line length.
Diffstat (limited to 'runtime/lua/vim/shared.lua')
0 files changed, 0 insertions, 0 deletions