Mercurial > vim
diff src/terminal.c @ 13996:59121ffd7fce v8.1.0016
patch 8.1.0016: possible crash in term_wait()
commit https://github.com/vim/vim/commit/d45aa55d42211eb2f42e0a04ff77537a5df51c40
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 21 22:50:29 2018 +0200
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 https://github.com/vim/vim/issues/2944)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 21 May 2018 23:00:06 +0200 |
parents | 411dd50f1daa |
children | d9fc15c833d5 |
line wrap: on
line diff
--- a/src/terminal.c +++ b/src/terminal.c @@ -5264,11 +5264,11 @@ f_term_wait(typval_T *argvars, typval_T { 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();