From 551a0d0f301bfc9e9ae92614511d073b13954701 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Thu, 5 Oct 2017 13:17:18 +0200 Subject: [PATCH] core: add safety check to rval_get_tmp_str() See #1263 (cherry picked from commit c6e921e45f1257913848110189eab82a34aa2f8b) --- rvalue.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rvalue.c b/rvalue.c index a38a5246ea7..921b4a05162 100644 --- a/rvalue.c +++ b/rvalue.c @@ -1102,7 +1102,11 @@ 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,