[SR-Users] [sr-users] Function sdp_get_line_startswith in sdpops removes \r in SIP messages

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 6 11:38:56 CET 2013


Hello,

thanks, it was fixed on master and backported to 4.1 branch.

Cheers,
Daniel

On 12/6/13 10:50 AM, Tuan Viet Nguyen wrote:
> Hello,
>
> It seems that when calling the function sdp_get_line_startswith, it 
> removes the \r (0d in hexa) from the SIP message before forwarding it. 
> In the code (sdpops_mod.c) from line 1402 to 1406, we see that
>
> // remove ending \r\n if exists
>       if (avp_val.s.s[line.len-2] == '\r' && avp_val.s.s[line.len-1] 
> == '\n')
>       {
>           avp_val.s.s[line.len-2] = '\0';
>           avp_val.s.len -= 2;
>       }
>
> As avp_val is the pointer pointing directly to the line in the 
> message, all modification made to this variable will also be applied 
> to the message.
>
> Am I wrong?
>
> Regards,
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131206/96c571f7/attachment.html>


More information about the sr-users mailing list