mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
Fix the parsing of the "reason" parameter in the
Diversion: header. (closes issue #13195) Reported by: woodsfsg git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@134556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -11006,6 +11006,8 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq)
|
||||
if (ast_strlen_zero(tmp))
|
||||
return 0;
|
||||
|
||||
params = strchr(tmp, ';');
|
||||
|
||||
exten = get_in_brackets(tmp);
|
||||
if (!strncasecmp(exten, "sip:", 4)) {
|
||||
exten += 4;
|
||||
@@ -11017,7 +11019,7 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq)
|
||||
}
|
||||
|
||||
/* Get diversion-reason param if present */
|
||||
if ((params = strchr(tmp, ';'))) {
|
||||
if (params) {
|
||||
*params = '\0'; /* Cut off parameters */
|
||||
params++;
|
||||
while (*params == ';' || *params == ' ')
|
||||
|
||||
Reference in New Issue
Block a user