Skip to content

Commit a9f77be

Browse files
committed
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>
1 parent 9162e63 commit a9f77be

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/diff.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,8 +2062,11 @@ count_filler_lines_and_topline(
20622062
else
20632063
{
20642064
(*linesfiller) = 0;
2065-
ch_virtual_lines = get_max_diff_length(curdif);
2066-
isfiller = (curdif->df_count[toidx] ? FALSE : TRUE);
2065+
if (curdif)
2066+
{
2067+
ch_virtual_lines = get_max_diff_length(curdif);
2068+
isfiller = (curdif->df_count[toidx] ? FALSE : TRUE);
2069+
}
20672070
if (isfiller)
20682071
{
20692072
while (curdif && curdif->df_next &&

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
1023,
707709
/**/
708710
1022,
709711
/**/

0 commit comments

Comments
 (0)