From: Christian Brabandt Date: Thu, 16 Jan 2025 18:06:57 +0000 (+0100) Subject: patch 9.1.1023: Coverity complains about dereferencing NULL pointer X-Git-Tag: v9.1.1023^0 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a9f77be9223f8b886d89f7fac778d363586beb85;p=thirdparty%2Fvim.git patch 9.1.1023: Coverity complains about dereferencing NULL pointer Problem: Coverity complains about dereferencing NULL pointer Solution: Verify curdiff is not null before dereferencing it closes: #16437 Signed-off-by: Christian Brabandt --- diff --git a/src/diff.c b/src/diff.c index 7e56641720..c348894ec9 100644 --- a/src/diff.c +++ b/src/diff.c @@ -2062,8 +2062,11 @@ count_filler_lines_and_topline( else { (*linesfiller) = 0; - ch_virtual_lines = get_max_diff_length(curdif); - isfiller = (curdif->df_count[toidx] ? FALSE : TRUE); + if (curdif) + { + ch_virtual_lines = get_max_diff_length(curdif); + isfiller = (curdif->df_count[toidx] ? FALSE : TRUE); + } if (isfiller) { while (curdif && curdif->df_next && diff --git a/src/version.c b/src/version.c index f2d77568f8..92bba85007 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 */ +/**/ + 1023, /**/ 1022, /**/