Module: kamailio
Branch: master
Commit: 54a0aeee9d30ee85045150d8ad5b75f7a4b71d15
URL:
https://github.com/kamailio/kamailio/commit/54a0aeee9d30ee85045150d8ad5b75f…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-05T11:22:21+01:00
core: fix a crash in cfg parser related to invalid syntax cases
---
Modified: src/core/cfg.y
---
Diff:
https://github.com/kamailio/kamailio/commit/54a0aeee9d30ee85045150d8ad5b75f…
Patch:
https://github.com/kamailio/kamailio/commit/54a0aeee9d30ee85045150d8ad5b75f…
---
diff --git a/src/core/cfg.y b/src/core/cfg.y
index 23ab69ee08..6319f8b5b4 100644
--- a/src/core/cfg.y
+++ b/src/core/cfg.y
@@ -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) {