0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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 <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2025-01-16 19:06:57 +01:00
parent 9162e636b3
commit a9f77be922
2 changed files with 7 additions and 2 deletions

View File

@@ -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 &&