0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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.
This commit is contained in:
Bram Moolenaar
2021-07-23 19:30:19 +02:00
parent c9e7e344ed
commit 1b862c466b
2 changed files with 5 additions and 3 deletions

View File

@@ -5175,14 +5175,14 @@ compile_and_or(
cctx->ctx_lnum = start_ctx_lnum;
status = check_ppconst_bool(ppconst);
if (status == OK)
if (status != FAIL)
{
// TODO: use ppconst if the value is a constant
generate_ppconst(cctx, ppconst);
// Every part must evaluate to a bool.
status = (bool_on_stack(cctx));
if (status == OK)
status = bool_on_stack(cctx);
if (status != FAIL)
status = ga_grow(&end_ga, 1);
}
cctx->ctx_lnum = save_lnum;