Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
patch 8.1.0016: possible crash in term_wait()
Problem:    Possible crash in term_wait(). (Dominique Pelle)
Solution:   Check for a valid buffer after ui_delay(). (closes #2944)
  • Loading branch information
brammool committed May 21, 2018
1 parent 05af9a4 commit d45aa55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/terminal.c
Expand Up @@ -5264,11 +5264,11 @@ f_term_wait(typval_T *argvars, typval_T *rettv UNUSED)
{
mch_check_messages();
parse_queued_messages();
ui_delay(10L, FALSE);
if (!buf_valid(buf))
/* If the terminal is closed when the channel is closed the
* buffer disappears. */
break;
ui_delay(10L, FALSE);
}
mch_check_messages();
parse_queued_messages();
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -761,6 +761,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
16,
/**/
15,
/**/
Expand Down

0 comments on commit d45aa55

Please sign in to comment.