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.
This commit is contained in:
@ -1726,7 +1726,7 @@ ex_retab(exarg_T *eap)
|
|||||||
len = num_spaces + num_tabs;
|
len = num_spaces + num_tabs;
|
||||||
old_len = (long)STRLEN(ptr);
|
old_len = (long)STRLEN(ptr);
|
||||||
new_len = old_len - col + start_col + len + 1;
|
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));
|
emsg(_(e_resulting_text_too_long));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4364,
|
||||||
/**/
|
/**/
|
||||||
4363,
|
4363,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user