]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1233 v7.4.1233
authorBram Moolenaar <Bram@vim.org>
Mon, 1 Feb 2016 20:47:13 +0000 (21:47 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 1 Feb 2016 20:47:13 +0000 (21:47 +0100)
Problem:    Channel command may cause a crash.
Solution:   Check for NULL argument. (Damien)

src/channel.c
src/version.c

index f329250973b78d5f8efc618dface76834093ce42..8cb9a352eec21152314d680b59f093b696ddd8b5 100644 (file)
@@ -629,6 +629,8 @@ channel_exe_cmd(int idx, char_u *cmd, typval_T *arg2, typval_T *arg3)
        return;
     }
     arg = arg2->vval.v_string;
+    if (arg == NULL)
+       arg = (char_u *)"";
 
     if (STRCMP(cmd, "ex") == 0)
     {
@@ -647,7 +649,7 @@ channel_exe_cmd(int idx, char_u *cmd, typval_T *arg2, typval_T *arg3)
     {
        exarg_T ea;
 
-       ea.forceit = arg != NULL && *arg != NUL;
+       ea.forceit = *arg != NUL;
        ex_redraw(&ea);
        showruler(FALSE);
        setcursor();
index 04231004f678823b970f47d43f77c6d158fdbf83..1bb4030f990c759e8205ce60fee29546df63321d 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1233,
 /**/
     1232,
 /**/