Patch 8.2.2414
Problem: Using freed memory when closing the cmdline window.
Solution: Check the window is still valid.
Files: src/ex_getln.c
*** ../vim-8.2.2413/src/ex_getln.c 2021-01-26 21:35:05.048158026 +0100
--- src/ex_getln.c 2021-01-26 21:59:15.218347244 +0100
***************
*** 4395,4404 ****
// Avoid command-line window first character being concealed.
curwin->w_p_cole = 0;
# endif
wp = curwin;
set_bufref(&bufref, curbuf);
win_goto(old_curwin);
! win_close(wp, TRUE);
// win_close() may have already wiped the buffer when 'bh' is
// set to 'wipe'
--- 4395,4409 ----
// Avoid command-line window first character being concealed.
curwin->w_p_cole = 0;
# endif
+ // First go back to the original window.
wp = curwin;
set_bufref(&bufref, curbuf);
win_goto(old_curwin);
!
! // win_goto() may trigger an autocommand that already closes the
! // cmdline window.
! if (win_valid(wp))
! win_close(wp, TRUE);
// win_close() may have already wiped the buffer when 'bh' is
// set to 'wipe'
*** ../vim-8.2.2413/src/version.c 2021-01-26 21:35:05.052158016 +0100
--- src/version.c 2021-01-26 22:00:31.618184606 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2414,
/**/
--
If you're sending someone Styrofoam, what do you pack it in?
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/202101262101.10QL1Otf3522104%40masaka.moolenaar.net.