diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-02-12 22:24:08 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2022-02-12 22:25:39 +0000 |
commit | 5c62bce7c12638c217f8297212698ed10bb5543b (patch) | |
tree | c75b6b76f907ef7bc43e1a888aef810615d1c01a /src | |
parent | 72e3d2c9baabfbcf3f6505097754472c0e88b317 (diff) | |
download | rneovim-5c62bce7c12638c217f8297212698ed10bb5543b.tar.gz rneovim-5c62bce7c12638c217f8297212698ed10bb5543b.tar.bz2 rneovim-5c62bce7c12638c217f8297212698ed10bb5543b.zip |
vim-patch:8.2.4364: MS-Windows: still running out of memory for a very long line
Problem: MS-Windows: still running out of memory for a very long line.
Solution: Check for negative length.
https://github.com/vim/vim/commit/45491660787043ea412719544881db691338d730
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 306da0ec68..49bf9972b1 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -815,7 +815,7 @@ void ex_retab(exarg_T *eap) len = num_spaces + num_tabs; old_len = (long)STRLEN(ptr); const long new_len = old_len - col + start_col + len + 1; - if (new_len >= MAXCOL) { + if (new_len <= 0 || new_len >= MAXCOL) { emsg(_(e_resulting_text_too_long)); break; } |