Permalink
Browse files

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 d45aa55d42211eb2f42e0a04ff77537a5df51c40
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/terminal.c
  2. +2 −0 src/version.c
@@ -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();
@@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
16,
/**/
15,
/**/

0 comments on commit d45aa55

Please sign in to comment.