]> granicus.if.org Git - vim/commitdiff
patch 8.1.0016: possible crash in term_wait() v8.1.0016
authorBram Moolenaar <Bram@vim.org>
Mon, 21 May 2018 20:50:29 +0000 (22:50 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 21 May 2018 20:50:29 +0000 (22:50 +0200)
Problem:    Possible crash in term_wait(). (Dominique Pelle)
Solution:   Check for a valid buffer after ui_delay(). (closes #2944)

src/terminal.c
src/version.c

index 817e6b9375f09c55d239fcf8e6205da07abc1a23..6967df73c735df2671495077397a8fa7152e9671 100644 (file)
@@ -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();
index d1a75a1148ef5896267185a89772bb42360df4c1..7d941bbe4462e898c06745baea61b2edf4a376e3 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    16,
 /**/
     15,
 /**/