Module: kamailio
Branch: 5.5
Commit: 2b432d35f0691d9ef6b12908909d809dbb1fa57b
URL:
https://github.com/kamailio/kamailio/commit/2b432d35f0691d9ef6b12908909d809…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-11-05T08:47:23+01:00
pv: handle case when var value ha flag str but null pointer
(cherry picked from commit 6eb67eaa4fc27d1eb7da7b2b674ffe8e7f86ecbc)
---
Modified: src/modules/pv/pv_svar.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2b432d35f0691d9ef6b12908909d809…
Patch:
https://github.com/kamailio/kamailio/commit/2b432d35f0691d9ef6b12908909d809…
---
diff --git a/src/modules/pv/pv_svar.c b/src/modules/pv/pv_svar.c
index 255f9f2040..456e21963a 100644
--- a/src/modules/pv/pv_svar.c
+++ b/src/modules/pv/pv_svar.c
@@ -90,7 +90,7 @@ script_var_t* set_var_value(script_var_t* var, int_str *value, int
flags)
{
if(var==0)
return 0;
- if(value==NULL)
+ if((value==NULL) || ((flags&VAR_VAL_STR) && (var->v.value.s.s==NULL)))
{
if(var->v.flags&VAR_VAL_STR)
{