Skip to content

Commit

Permalink
core: fix a crash in cfg parser related to invalid syntax cases
Browse files Browse the repository at this point in the history
  • Loading branch information
henningw committed Mar 5, 2020
1 parent 395303d commit 54a0aee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/cfg.y
Expand Up @@ -2893,7 +2893,7 @@ rval_expr: rval { $$=$1;
| rval_expr rve_cmpop rval_expr %prec GT { $$=mk_rve2( $2, $1, $3);}
| rval_expr rve_equalop rval_expr %prec EQUAL_T {
/* comparing with $null => treat as defined or !defined */
if($3->op==RVE_RVAL_OP && $3->left.rval.type==RV_PVAR
if($3 != NULL && $3->op==RVE_RVAL_OP && $3->left.rval.type==RV_PVAR
&& $3->left.rval.v.pvs.type==PVT_NULL) {
if($2==RVE_DIFF_OP || $2==RVE_IDIFF_OP
|| $2==RVE_STRDIFF_OP) {
Expand Down

0 comments on commit 54a0aee

Please sign in to comment.