From: Mark Michelson Date: Tue, 15 May 2012 23:37:51 +0000 (+0000) Subject: Correct misuse of ast_strip_quoted() when getting a Diversion header's reason parameter. X-Git-Tag: 1.8.14.0-rc1~3^2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e7f34fa05dba348680484b5672203243fa51e6e;p=thirdparty%2Fasterisk.git Correct misuse of ast_strip_quoted() when getting a Diversion header's reason parameter. The use here was assuming that the pointer would be updated, but the updated string is actually returned by ast_strip_quoted() instead. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366597 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4745417710..93b191dfc7 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -15260,7 +15260,7 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq, char **name, c } /* Remove enclosing double-quotes */ if (*reason_param == '"') - ast_strip_quoted(reason_param, "\"", "\""); + reason_param = ast_strip_quoted(reason_param, "\"", "\""); if (!ast_strlen_zero(reason_param)) { sip_set_redirstr(p, reason_param); if (p->owner) {