0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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

@@ -5287,6 +5287,7 @@ chk_modeline(
#ifdef FEAT_EVAL
sctx_T save_current_sctx;
#endif
ESTACK_CHECK_DECLARATION
prev = -1;
for (s = ml_get(lnum); *s != NUL; ++s)
@@ -5330,6 +5331,7 @@ chk_modeline(
// prepare for emsg()
estack_push(ETYPE_MODELINE, (char_u *)"modelines", lnum);
ESTACK_CHECK_SETUP
end = FALSE;
while (end == FALSE)
@@ -5390,6 +5392,7 @@ chk_modeline(
s = e + 1; // advance to next part
}
ESTACK_CHECK_NOW
estack_pop();
vim_free(linecopy);
}