[sr-dev] git:5.0:9e3096e1: core: add safety check to rval_get_tmp_str()
Victor Seva
linuxmaniac at torreviejawireless.org
Wed Oct 11 18:32:14 CEST 2017
Module: kamailio
Branch: 5.0
Commit: 9e3096e16ac233e1667110904e1d944753d53c7a
URL: https://github.com/kamailio/kamailio/commit/9e3096e16ac233e1667110904e1d944753d53c7a
Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at 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/9e3096e16ac233e1667110904e1d944753d53c7a.diff
Patch: https://github.com/kamailio/kamailio/commit/9e3096e16ac233e1667110904e1d944753d53c7a.patch
---
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,
More information about the sr-dev
mailing list