diff src/spellfile.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 45eb6f37692e
children 9daed26b788b
line wrap: on
line diff
--- 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;
 }