From 362be6ba2700e864f3c755d2366a8088bead21fa Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 22 Apr 2025 20:06:53 +0200 Subject: [PATCH] patch 9.1.1335: Coverity complains about Null pointer dereferences Problem: Coverity complains about Null pointer dereferences Solution: before accessing ccline->cmdbuff check that ccline is not NULL Fixes: Coverity issue 1646601 closes: #17189 Signed-off-by: Christian Brabandt --- src/cmdexpand.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 5b87d7804a..e8bc0805ca 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -382,7 +382,7 @@ cmdline_pum_create( } // Compute the popup menu starting column - compl_startcol = vim_strsize(ccline->cmdbuff) + 1; + compl_startcol = ccline == NULL ? 0 : vim_strsize(ccline->cmdbuff) + 1; columns = vim_strsize(xp->xp_pattern); if (showtail) { diff --git a/src/version.c b/src/version.c index 1a17d2e4c7..2d36034abd 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1335, /**/ 1334, /**/