forked from aniani/vim
patch 8.0.1317: accessing freed memory in term_wait()
Problem: Accessing freed memory in term_wait(). (Dominique Pelle) Solution: Check that the buffer still exists.
This commit is contained in:
@@ -3227,6 +3227,10 @@ f_term_wait(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
{
|
{
|
||||||
mch_check_messages();
|
mch_check_messages();
|
||||||
parse_queued_messages();
|
parse_queued_messages();
|
||||||
|
if (!buf_valid(buf))
|
||||||
|
/* If the terminal is closed when the channel is closed the
|
||||||
|
* buffer disappears. */
|
||||||
|
break;
|
||||||
ui_delay(10L, FALSE);
|
ui_delay(10L, FALSE);
|
||||||
}
|
}
|
||||||
mch_check_messages();
|
mch_check_messages();
|
||||||
|
@@ -771,6 +771,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1317,
|
||||||
/**/
|
/**/
|
||||||
1316,
|
1316,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user