changeset 7872:4b9d4600166f v7.4.1233

commit https://github.com/vim/vim/commit/14ad611ca435d97e8fd0d9ab03ddc982843298ac Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 1 21:47:13 2016 +0100 patch 7.4.1233 Problem: Channel command may cause a crash. Solution: Check for NULL argument. (Damien)
author Christian Brabandt <cb@256bit.org>
date Mon, 01 Feb 2016 22:00:05 +0100
parents c5eb970c8c87
children e105d9205fa9
files src/channel.c src/version.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -629,6 +629,8 @@ channel_exe_cmd(int idx, char_u *cmd, ty
 	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, ty
     {
 	exarg_T ea;
 
-	ea.forceit = arg != NULL && *arg != NUL;
+	ea.forceit = *arg != NUL;
 	ex_redraw(&ea);
 	showruler(FALSE);
 	setcursor();
--- a/src/version.c
+++ b/src/version.c
@@ -743,6 +743,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1233,
+/**/
     1232,
 /**/
     1231,