# HG changeset patch # User Christian Brabandt # Date 1526936406 -7200 # Node ID 59121ffd7fce43180aae7524cd7d7cfb061153cf # Parent d854ec09a9a4c45f05f117344f86af5f4636f82f patch 8.1.0016: possible crash in term_wait() commit https://github.com/vim/vim/commit/d45aa55d42211eb2f42e0a04ff77537a5df51c40 Author: Bram Moolenaar 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) diff --git a/src/terminal.c b/src/terminal.c --- 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(); diff --git a/src/version.c b/src/version.c --- 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,