On Tue, Apr 30, 2013 at 01:29:21PM +0200, Martin Mikkelsen wrote: > I am not sure what the best fix would be for that, but I have attached a > patch which copies the string in the TR_S_SUBST code to _tr_buffer and > returns that buffer instead like a lot of the other transformations in > that function does. > > If this fix is correct some other transformation functions probably > needs to be corrected as well.
Forgot to attach the patch. Sorry. -- Martin Mikkelsen, Zisson AS
diff -ruN kamailio-3.3.4.orig/modules_k/pv/pv_trans.c kamailio-3.3.4/modules_k/pv/pv_trans.c --- kamailio-3.3.4.orig/modules_k/pv/pv_trans.c 2013-02-25 18:20:37.000000000 +0100 +++ kamailio-3.3.4/modules_k/pv/pv_trans.c 2013-04-30 12:38:23.000000000 +0200 @@ -309,8 +309,12 @@ LM_ERR("substr negative offset\n"); return -1; } + memcpy(_tr_buffer, val->rs.s, val->rs.len); + st.s = _tr_buffer; + st.len = val->rs.len; val->flags = PV_VAL_STR; val->ri = 0; + val->rs = st; if(i>=0) { if(i>=val->rs.len)
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users