diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-07 20:59:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-07 20:59:34 +0100 |
commit | e31ee86859528a7ffe00405645547d494e522fa8 (patch) | |
tree | 741c24aea3fae5efb613d64314a6721d6cad85c5 /src/spellfile.c | |
parent | ce6db0273f2c4359f48d75103a42991aa481f14e (diff) | |
download | vim-git-e31ee86859528a7ffe00405645547d494e522fa8.tar.gz |
patch 8.2.0098: exe stack length can be wrong without being detectedv8.2.0098
Problem: Exe stack length can be wrong without being detected.
Solution: Add a check when ABORT_ON_INTERNAL_ERROR is defined.
Diffstat (limited to 'src/spellfile.c')
-rw-r--r-- | src/spellfile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/spellfile.c b/src/spellfile.c index fa450f33d..c3e53b330 100644 --- a/src/spellfile.c +++ b/src/spellfile.c @@ -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; } |