Module: kamailio
Branch: 5.3
Commit: 15ff3bbb0fb79c49f1913fa604680a4904251a50
URL:
https://github.com/kamailio/kamailio/commit/15ff3bbb0fb79c49f1913fa604680a4…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-05T11:23:16+01:00
core: fix a crash in cfg parser related to invalid syntax cases
(cherry picked from commit 54a0aeee9d30ee85045150d8ad5b75f7a4b71d15)
---
Modified: src/core/cfg.y
---
Diff:
https://github.com/kamailio/kamailio/commit/15ff3bbb0fb79c49f1913fa604680a4…
Patch:
https://github.com/kamailio/kamailio/commit/15ff3bbb0fb79c49f1913fa604680a4…
---
diff --git a/src/core/cfg.y b/src/core/cfg.y
index 3a0f0286a7..602d2f3330 100644
--- a/src/core/cfg.y
+++ b/src/core/cfg.y
@@ -2890,7 +2890,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) {