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 /src/terminal.c | |
parent | 05af9a419198245f0810301ac9a3d59a9432ef21 (diff) | |
download | vim-git-d45aa55d42211eb2f42e0a04ff77537a5df51c40.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)
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 2 |
1 files changed, 1 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(); |