mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
vim-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: vim/vim#16437
a9f77be922
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -1866,8 +1866,10 @@ static void count_filler_lines_and_topline(int *curlinenum_to, int *linesfiller,
|
||||
}
|
||||
} 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 && curdif->df_lnum[toidx] ==
|
||||
curdif->df_next->df_lnum[toidx]
|
||||
|
Reference in New Issue
Block a user