From: Bram Moolenaar Date: Sat, 12 Feb 2022 21:59:51 +0000 (+0000) Subject: patch 8.2.4364: MS-Windows: still running out of memory for a very long line X-Git-Tag: v8.2.4364 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45491660787043ea412719544881db691338d730;p=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. --- diff --git a/src/indent.c b/src/indent.c index 3148495db..95fc74ee4 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; diff --git a/src/version.c b/src/version.c index 18f7892f1..ea5119c32 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4364, /**/ 4363, /**/