Skip to content

Commit

Permalink
Merge pull request #3012 from purecloudlabs/bug/rport_param_corrupts_…
Browse files Browse the repository at this point in the history
…via_header

add_local_rport script function corrupts VIA header params

(cherry picked from commit 8f41fcc)
  • Loading branch information
bogdan-iancu committed Mar 23, 2023
1 parent faa4846 commit 2d674b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion msg_translator.c
Original file line number Diff line number Diff line change
Expand Up @@ -2194,8 +2194,10 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg,
if(id_buf!=0) {
memcpy(extra_params.s, id_buf, id_len);
pkg_free(id_buf);
} else if (via_params)
} else if (via_params) {
memcpy(extra_params.s, via_params->s, via_params->len);
id_len = via_params->len;
}
memcpy(extra_params.s+id_len, RPORT, RPORT_LEN-1);
extra_params.s[extra_params.len]='\0';
LM_DBG("extra param added: <%.*s>\n",extra_params.len, extra_params.s);
Expand Down

0 comments on commit 2d674b0

Please sign in to comment.