Mercurial > vim
diff src/buffer.c @ 19075:af1eca322b9e v8.2.0098
patch 8.2.0098: exe stack length can be wrong without being detected
Commit: https://github.com/vim/vim/commit/e31ee86859528a7ffe00405645547d494e522fa8
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 7 20:59:34 2020 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 Jan 2020 21:00:07 +0100 |
parents | af795b6a2624 |
children | 2ef19eed524a |
line wrap: on
line diff
--- a/src/buffer.c +++ b/src/buffer.c @@ -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); }