Module: kamailio
Branch: 4.3
Commit: 3551d707fa497554f3da767e9fba8e046f83b417
URL:
https://github.com/kamailio/kamailio/commit/3551d707fa497554f3da767e9fba8e0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-07-17T12:29:57+02:00
pv: catch early setting $rU with empty string
- avoids backing up and restoring last char, which can create
inappropriate access when using static empty string value
(cherry picked from commit adf1bca4a820e9cb5fcc94a1953b0fcdbd8a20da)
---
Modified: modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3551d707fa497554f3da767e9fba8e0…
Patch:
https://github.com/kamailio/kamailio/commit/3551d707fa497554f3da767e9fba8e0…
---
diff --git a/modules/pv/pv_core.c b/modules/pv/pv_core.c
index 9cbad39..745286a 100644
--- a/modules/pv/pv_core.c
+++ b/modules/pv/pv_core.c
@@ -2080,7 +2080,8 @@ int pv_set_ruri_user(struct sip_msg* msg, pv_param_t *param,
return -1;
}
- if((val==NULL) || (val->flags&PV_VAL_NULL))
+ if((val==NULL) || (val->flags&PV_VAL_NULL)
+ || ((val->flags&PV_VAL_STR) && val->rs.len<=0))
{
memset(&act, 0, sizeof(act));
act.type = SET_USER_T;