[Asterisk-code-review] res pjsip caller id: Fix segfault when replacing rpid or pai... (asterisk[13])

George Joseph asteriskteam at digium.com
Mon Feb 15 15:53:25 CST 2016


George Joseph has uploaded a new patch set (#2).

Change subject: res_pjsip_caller_id: Fix segfault when replacing rpid or pai header
......................................................................

res_pjsip_caller_id: Fix segfault when replacing rpid or pai header

If the PJSIP_HEADER dialplan function adds a PAI or RPID header and send_rpid
or send_pai is set, res_pjsip_caller_id attemps to retrieve, parse and modify
the header added by the dialplan function.  Since the header added by the
dialplan function is generic string, there are no virtual functions to parse
the uri and we get a segfault when we try.  Since the modify, was really only
an overwrite, we now just delete the old header if it was type PJSIP_H_OTHER
and recreate it.

This raises a question for another time though:  What should happen with
duplicate headers?  Right now res_pjsip_header_funcs doesn't check for dups
so if it's session supplement is loaded after res_pjsip_caller_id's (or any
other module that adds headers), there'll be dups in the message.

ASTERISK-25337 #close

Change-Id: I5e296b52d30f106b822c0eb27c4c2b0e0f71c7fa
---
M res/res_pjsip_caller_id.c
1 file changed, 32 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/51/2251/2
-- 
To view, visit https://gerrit.asterisk.org/2251
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5e296b52d30f106b822c0eb27c4c2b0e0f71c7fa
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-code-review mailing list