diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-02-15 18:04:22 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2022-02-17 14:45:21 +0000 |
commit | ac5856b3f515a39f5047f47d9c675a6206ce19bf (patch) | |
tree | 62a5e0e19ecb227b13ea4e63f461524355c5ac73 /runtime/lua/vim/_meta.lua | |
parent | f4e24f1eabfac439ac09d9646582f682c02cfe3f (diff) | |
download | rneovim-ac5856b3f515a39f5047f47d9c675a6206ce19bf.tar.gz rneovim-ac5856b3f515a39f5047f47d9c675a6206ce19bf.tar.bz2 rneovim-ac5856b3f515a39f5047f47d9c675a6206ce19bf.zip |
vim-patch:8.2.3492: crash when pasting too many times
Problem: Crash when pasting too many times.
Solution: Limit the size to what fits in an int. (closes vim/vim#8962)
https://github.com/vim/vim/commit/eeed1c7ae090c17f4df51cf97b2a9e4d8b4f4dc7
Note that this overflow check pretty bad.
It also doesn't work well on Windows (where sizeof(int) == sizeof(long)).
This is all temporary; everything here is rewritten in future patches anyway.
e_resulting_text_too_long was already cherry-picked.
totlen is size_t in Nvim, but is int in Vim. This means we'll need some casts.
We could technically adjust the logic in do_put to use the entire range of
size_t in stuff like totlen, but there's not much gain, and it's much easier to
just port the patch like Vim as was done before (also allows us to use the same
tests).
Diffstat (limited to 'runtime/lua/vim/_meta.lua')
0 files changed, 0 insertions, 0 deletions