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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user