Skip to content

Commit 1b862c4

Browse files
committed
patch 8.2.3205: Coverity reports a null pointer dereference
Problem: Coverity reports a null pointer dereference. Solution: Change the logic to avoid Coverity gets confused.
1 parent c9e7e34 commit 1b862c4

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/version.c

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

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3205,
758760
/**/
759761
3204,
760762
/**/

src/vim9compile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5175,14 +5175,14 @@ compile_and_or(
51755175
cctx->ctx_lnum = start_ctx_lnum;
51765176

51775177
status = check_ppconst_bool(ppconst);
5178-
if (status == OK)
5178+
if (status != FAIL)
51795179
{
51805180
// TODO: use ppconst if the value is a constant
51815181
generate_ppconst(cctx, ppconst);
51825182

51835183
// Every part must evaluate to a bool.
5184-
status = (bool_on_stack(cctx));
5185-
if (status == OK)
5184+
status = bool_on_stack(cctx);
5185+
if (status != FAIL)
51865186
status = ga_grow(&end_ga, 1);
51875187
}
51885188
cctx->ctx_lnum = save_lnum;

0 commit comments

Comments
 (0)