diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-02-12 21:59:51 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-12 21:59:51 +0000 |
commit | 45491660787043ea412719544881db691338d730 (patch) | |
tree | 2e40848fce68beb7739b44c2f47c878a49ab4b8b /src/indent.c | |
parent | 8e38555ece7d3fe1edc6681ec70fe5586a524862 (diff) |
patch 8.2.4364: MS-Windows: still running out of memory for a very long linev8.2.4364
Problem: MS-Windows: still running out of memory for a very long line.
Solution: Check for negative length.
Diffstat (limited to 'src/indent.c')
-rw-r--r-- | src/indent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/indent.c b/src/indent.c index 3148495db1..95fc74ee46 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1726,7 +1726,7 @@ ex_retab(exarg_T *eap) len = num_spaces + num_tabs; old_len = (long)STRLEN(ptr); 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; |