- avoids backing up and restoring last char, which can create
inappropriate access when using static empty string value
(cherry picked from commit adf1bca4a820e9cb5fcc94a1953b0fcdbd8a20da)
... | ... |
@@ -2080,7 +2080,8 @@ int pv_set_ruri_user(struct sip_msg* msg, pv_param_t *param, |
2080 | 2080 |
return -1; |
2081 | 2081 |
} |
2082 | 2082 |
|
2083 |
- if((val==NULL) || (val->flags&PV_VAL_NULL)) |
|
2083 |
+ if((val==NULL) || (val->flags&PV_VAL_NULL) |
|
2084 |
+ || ((val->flags&PV_VAL_STR) && val->rs.len<=0)) |
|
2084 | 2085 |
{ |
2085 | 2086 |
memset(&act, 0, sizeof(act)); |
2086 | 2087 |
act.type = SET_USER_T; |