Commit: patch 9.2.0714: Coverity warns for NULL deref

1 view
Skip to first unread message

Christian Brabandt

unread,
1:45 PM (8 hours ago) 1:45 PM
to vim...@googlegroups.com
patch 9.2.0714: Coverity warns for NULL deref

Commit: https://github.com/vim/vim/commit/19ab872a905e0f6f2a9df3aa008459f286dc4e5c
Author: Christian Brabandt <c...@256bit.org>
Date: Wed Jun 24 17:29:22 2026 +0000

patch 9.2.0714: Coverity warns for NULL deref

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 <c...@256bit.org>

diff --git a/src/clientserver.c b/src/clientserver.c
index 5b0d4a2df..60849fe1e 100644
--- a/src/clientserver.c
+++ b/src/clientserver.c
@@ -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);
diff --git a/src/version.c b/src/version.c
index 02d7bc410..5a42a1ef1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 714,
/**/
713,
/**/
Reply all
Reply to author
Forward
0 new messages