comparison 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
comparison
equal deleted inserted replaced
19074:d7a865d2db06 19075:af1eca322b9e
351 int len; 351 int len;
352 slang_T *lp = NULL; 352 slang_T *lp = NULL;
353 int c = 0; 353 int c = 0;
354 int res; 354 int res;
355 int did_estack_push = FALSE; 355 int did_estack_push = FALSE;
356 ESTACK_CHECK_DECLARATION
356 357
357 fd = mch_fopen((char *)fname, "r"); 358 fd = mch_fopen((char *)fname, "r");
358 if (fd == NULL) 359 if (fd == NULL)
359 { 360 {
360 if (!silent) 361 if (!silent)
391 else 392 else
392 lp = old_lp; 393 lp = old_lp;
393 394
394 // Set sourcing_name, so that error messages mention the file name. 395 // Set sourcing_name, so that error messages mention the file name.
395 estack_push(ETYPE_SPELL, fname, 0); 396 estack_push(ETYPE_SPELL, fname, 0);
397 ESTACK_CHECK_SETUP
396 did_estack_push = TRUE; 398 did_estack_push = TRUE;
397 399
398 /* 400 /*
399 * <HEADER>: <fileID> 401 * <HEADER>: <fileID>
400 */ 402 */
579 581
580 endOK: 582 endOK:
581 if (fd != NULL) 583 if (fd != NULL)
582 fclose(fd); 584 fclose(fd);
583 if (did_estack_push) 585 if (did_estack_push)
586 {
587 ESTACK_CHECK_NOW
584 estack_pop(); 588 estack_pop();
589 }
585 590
586 return lp; 591 return lp;
587 } 592 }
588 593
589 /* 594 /*