> On Nov. 18, 2014, 4:44 p.m., Matt Jordan wrote:
> > /branches/12/res/res_pjsip_refer.c, lines 876-884
> > <https://reviewboard.asterisk.org/r/4187/diff/1/?file=69002#file69002line876>
> >
> >     Why is it safe to modify the refer_to->hvalue.ptr directly? I would 
> > have thought we'd have to allocate a buffer and copy the header before 
> > manipulating it.

Nothing else will use the message and the ownership is with us until we return. 
Not gonna lie though - I copied it from PJSIP code. I can copy it from the pool 
and have it be NULL terminated.


- Joshua


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4187/#review13797
-----------------------------------------------------------


On Nov. 16, 2014, 11:36 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4187/
> -----------------------------------------------------------
> 
> (Updated Nov. 16, 2014, 11:36 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24508
>     https://issues.asterisk.org/jira/browse/ASTERISK-24508
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Currently when parsing the Refer-To header there is no guarantee that it will 
> be NULL terminated. It is also parsed as a 'To' header when in reality it 
> should be parsed as a URI as parsing as a 'To' header may sometimes 
> (seemingly) fail. This change fixes both.
> 
> 
> Diffs
> -----
> 
>   /branches/12/res/res_pjsip_refer.c 427708 
> 
> Diff: https://reviewboard.asterisk.org/r/4187/diff/
> 
> 
> Testing
> -------
> 
> Did transfers, confirmed they still work.
> 
> Provided patch to reporter and they confirmed it fixed the issue.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to