diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-05-21 22:50:29 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-05-21 22:50:29 +0200 |
commit | d45aa55d42211eb2f42e0a04ff77537a5df51c40 (patch) | |
tree | 178682b6e85ced272ba9ce20d924683e9cac7827 | |
parent | 05af9a419198245f0810301ac9a3d59a9432ef21 (diff) | |
download | vim-git-8.1.0016.tar.gz |
patch 8.1.0016: possible crash in term_wait()v8.1.0016
Problem: Possible crash in term_wait(). (Dominique Pelle)
Solution: Check for a valid buffer after ui_delay(). (closes #2944)
-rw-r--r-- | src/terminal.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c index 817e6b937..6967df73c 100644 --- a/src/terminal.c +++ b/src/terminal.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(); diff --git a/src/version.c b/src/version.c index d1a75a114..7d941bbe4 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 16, +/**/ 15, /**/ 14, |