Module: kamailio
Branch: master
Commit: c6e921e45f1257913848110189eab82a34aa2f8b
URL:
https://github.com/kamailio/kamailio/commit/c6e921e45f1257913848110189eab82…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-10-05T13:28:38+02:00
core: add safety check to rval_get_tmp_str()
See #1263
---
Modified: src/core/rvalue.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c6e921e45f1257913848110189eab82…
Patch:
https://github.com/kamailio/kamailio/commit/c6e921e45f1257913848110189eab82…
---
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,