Module: kamailio
Branch: master
Commit: 077651fa3bfd50e0f654c907f3783b1421497bd5
URL:
https://github.com/kamailio/kamailio/commit/077651fa3bfd50e0f654c907f3783b1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-12-13T12:15:28+01:00
core: check if conversion could not be done
---
Modified: src/core/route.c
---
Diff:
https://github.com/kamailio/kamailio/commit/077651fa3bfd50e0f654c907f3783b1…
Patch:
https://github.com/kamailio/kamailio/commit/077651fa3bfd50e0f654c907f3783b1…
---
diff --git a/src/core/route.c b/src/core/route.c
index a03330b6c04..69443e37b37 100644
--- a/src/core/route.c
+++ b/src/core/route.c
@@ -1559,6 +1559,11 @@ inline static int comp_rve(int op, struct rval_expr *rve, int
rtype,
if(unlikely(rv)) {
/* no int => str */
rv1 = rval_convert(h, msg, RV_STR, rv, &c1);
+ if(rv1 == NULL) {
+ LM_ERR("failure converting expression\n");
+ i = 0; /* false */
+ goto int_expr;
+ }
i = comp_str(op, &rv1->v.s, rtype, r, msg, h);
rval_destroy(rv1);
rval_destroy(rv);