Module: kamailio
Branch: 5.0
Commit: 9e3096e16ac233e1667110904e1d944753d53c7a
URL:
https://github.com/kamailio/kamailio/commit/9e3096e16ac233e1667110904e1d944…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-10-11T18:31:37+02:00
core: add safety check to rval_get_tmp_str()
See #1263
(cherry picked from commit c6e921e45f1257913848110189eab82a34aa2f8b)
---
Modified: src/core/rvalue.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9e3096e16ac233e1667110904e1d944…
Patch:
https://github.com/kamailio/kamailio/commit/9e3096e16ac233e1667110904e1d944…
---
diff --git a/src/core/rvalue.c b/src/core/rvalue.c
index 540f26620a..fcb238d111 100644
--- a/src/core/rvalue.c
+++ b/src/core/rvalue.c
@@ -1099,6 +1099,10 @@ int rval_get_tmp_str(struct run_act_ctx* h, struct sip_msg* msg,
avp_t* r_avp;
int i;
+ if(rv==NULL) {
+ return -1;
+ }
+
switch(rv->type){
case RV_INT:
tmpv->s=sint2strbuf(rv->v.l, tmp_cache->i2s,