Permalink
Browse files

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.
  • Loading branch information...
brammool committed Nov 19, 2017
1 parent 44c2bff commit e518226713784e628ae7ee077f1b66cb12b9ffd9
Showing with 6 additions and 0 deletions.
  1. +4 −0 src/terminal.c
  2. +2 −0 src/version.c
View
@@ -3227,6 +3227,10 @@ f_term_wait(typval_T *argvars, typval_T *rettv UNUSED)
{
mch_check_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);
}
mch_check_messages();
View
@@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1317,
/**/
1316,
/**/

0 comments on commit e518226

Please sign in to comment.