]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0714: Coverity warns for NULL deref v9.2.0714
authorChristian Brabandt <cb@256bit.org>
Wed, 24 Jun 2026 17:29:22 +0000 (17:29 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 24 Jun 2026 17:29:22 +0000 (17:29 +0000)
Problem:  Coverity warns for NULL dereference in f_remote_startserver()
Solution: Return early if the server name is null.

related: #20624

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/clientserver.c
src/version.c

index 5b0d4a2df9f2759a345b28035f818d192f250a7a..60849fe1e1ab47664a0c42289e8c60b25f147933 100644 (file)
@@ -1176,6 +1176,8 @@ f_remote_startserver(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
     }
 
     char_u *server = tv_get_string_chk(&argvars[0]);
+    if (server == NULL)
+       return;
 #  ifdef MSWIN
     if (clientserver_method == CLIENTSERVER_METHOD_MSWIN)
        serverSetName(server);
index 02d7bc410e810a146225577bc814477a75767a78..5a42a1ef14016734f08f7915f23e3644e7fe959c 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    714,
 /**/
     713,
 /**/