Patch 8.2.4880
Problem: Vim9: misplaced elseif causes invalid memory access.
Solution: Check cs_idx not to be negative.
Files: src/ex_eval.c
*** ../vim-8.2.4879/src/ex_eval.c 2022-05-05 17:02:41.494034106 +0100
--- src/ex_eval.c 2022-05-06 11:26:20.056878950 +0100
***************
*** 1124,1133 ****
skip = TRUE;
}
! // Variables declared in the previous block can no longer be
! // used. Needs to be done before setting "cs_flags".
! leave_block(cstack);
! enter_block(cstack);
// if skipping or the ":if" was TRUE, reset ACTIVE, otherwise set it
if (skip || cstack->cs_flags[cstack->cs_idx] & CSF_TRUE)
--- 1124,1136 ----
skip = TRUE;
}
! if (cstack->cs_idx >= 0)
! {
! // Variables declared in the previous block can no longer be
! // used. Needs to be done before setting "cs_flags".
! leave_block(cstack);
! enter_block(cstack);
! }
// if skipping or the ":if" was TRUE, reset ACTIVE, otherwise set it
if (skip || cstack->cs_flags[cstack->cs_idx] & CSF_TRUE)
*** ../vim-8.2.4879/src/version.c 2022-05-06 11:21:13.961097837 +0100
--- src/version.c 2022-05-06 11:27:19.492832599 +0100
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4880,
/**/
--
hundred-and-one symptoms of being an internet addict:
111. You and your friends get together regularly on IRC, even though
all of you live in the same street.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220506102822.E57871C03B1%40moolenaar.net.