From 33f52fa63df3a4f97c99f25034b757bc902673aa Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 18 Jun 2012 17:13:10 +0000 Subject: [PATCH] fix substitution bug on non-^ anchored patterns --- modules/dialplan/dp_repl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/dialplan/dp_repl.c b/modules/dialplan/dp_repl.c index f28b4a4f0..874d526e1 100644 --- a/modules/dialplan/dp_repl.c +++ b/modules/dialplan/dp_repl.c @@ -191,8 +191,8 @@ int rule_translate(struct sip_msg *msg, str string, dpl_node_t * rule, LM_ERR("overflow\n"); goto error; } - memcpy(result->s, string.s, ovector[0] - 1); - result->len += ovector[0] - 1; + memcpy(result->s, string.s, ovector[0]); + result->len += ovector[0]; } if (repl_comp) {