1
0
forked from aniani/vim

patch 8.2.0098: exe stack length can be wrong without being detected

Problem:    Exe stack length can be wrong without being detected.
Solution:   Add a check when ABORT_ON_INTERNAL_ERROR is defined.
This commit is contained in:
Bram Moolenaar
2020-01-07 20:59:34 +01:00
parent ce6db0273f
commit e31ee86859
10 changed files with 46 additions and 0 deletions

View File

@@ -353,6 +353,7 @@ spell_load_file(
int c = 0;
int res;
int did_estack_push = FALSE;
ESTACK_CHECK_DECLARATION
fd = mch_fopen((char *)fname, "r");
if (fd == NULL)
@@ -393,6 +394,7 @@ spell_load_file(
// Set sourcing_name, so that error messages mention the file name.
estack_push(ETYPE_SPELL, fname, 0);
ESTACK_CHECK_SETUP
did_estack_push = TRUE;
/*
@@ -581,7 +583,10 @@ endOK:
if (fd != NULL)
fclose(fd);
if (did_estack_push)
{
ESTACK_CHECK_NOW
estack_pop();
}
return lp;
}