Skip to content

Commit

Permalink
Fix parsing for Diversion header.
Browse files Browse the repository at this point in the history
As Diversion header may be a multi-body header, do not use the parse_to() function as it does not accept multiple bodies. Use parse_rr() function.
Reported by Nick Altmann.

(cherry picked from commit 3638492)
  • Loading branch information
bogdan-iancu committed Jun 3, 2015
1 parent 948208a commit 31ddc49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/sipmsgops/sipmsgops.c
Expand Up @@ -1588,7 +1588,6 @@ static int sip_validate_hdrs(struct sip_msg *msg)
case HDR_PAI_T:
case HDR_RPID_T:
case HDR_REFER_TO_T:
case HDR_DIVERSION_T:
/* these are similar */
if (!(to = pkg_malloc(sizeof(struct to_body)))) {
LM_ERR("out of pkg_memory\n");
Expand Down Expand Up @@ -1635,6 +1634,7 @@ static int sip_validate_hdrs(struct sip_msg *msg)
case HDR_PATH_T:
case HDR_ROUTE_T:
case HDR_RECORDROUTE_T:
case HDR_DIVERSION_T:
CHECK_HDR_FUNC(parse_rr, hf);
break;

Expand Down

0 comments on commit 31ddc49

Please sign in to comment.