Module: kamailio Branch: master Commit: adf1bca4a820e9cb5fcc94a1953b0fcdbd8a20da URL: https://github.com/kamailio/kamailio/commit/adf1bca4a820e9cb5fcc94a1953b0fcdbd8a20da
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2015-07-14T17:41:39+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 --- Modified: modules/pv/pv_core.c --- Diff: https://github.com/kamailio/kamailio/commit/adf1bca4a820e9cb5fcc94a1953b0fcdbd8a20da.diff Patch: https://github.com/kamailio/kamailio/commit/adf1bca4a820e9cb5fcc94a1953b0fcdbd8a20da.patch --- diff --git a/modules/pv/pv_core.c b/modules/pv/pv_core.c index 239858c..85b6351 100644 --- a/modules/pv/pv_core.c +++ b/modules/pv/pv_core.c @@ -2092,7 +2092,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; _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
