changeset 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 d854ec09a9a4
children 4400705e825a
files src/terminal.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
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();
--- 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,