mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -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:
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3205,
|
||||||
/**/
|
/**/
|
||||||
3204,
|
3204,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -5175,14 +5175,14 @@ compile_and_or(
|
|||||||
cctx->ctx_lnum = start_ctx_lnum;
|
cctx->ctx_lnum = start_ctx_lnum;
|
||||||
|
|
||||||
status = check_ppconst_bool(ppconst);
|
status = check_ppconst_bool(ppconst);
|
||||||
if (status == OK)
|
if (status != FAIL)
|
||||||
{
|
{
|
||||||
// TODO: use ppconst if the value is a constant
|
// TODO: use ppconst if the value is a constant
|
||||||
generate_ppconst(cctx, ppconst);
|
generate_ppconst(cctx, ppconst);
|
||||||
|
|
||||||
// Every part must evaluate to a bool.
|
// Every part must evaluate to a bool.
|
||||||
status = (bool_on_stack(cctx));
|
status = bool_on_stack(cctx);
|
||||||
if (status == OK)
|
if (status != FAIL)
|
||||||
status = ga_grow(&end_ga, 1);
|
status = ga_grow(&end_ga, 1);
|
||||||
}
|
}
|
||||||
cctx->ctx_lnum = save_lnum;
|
cctx->ctx_lnum = save_lnum;
|
||||||
|
Reference in New Issue
Block a user