[reSIProcate] Invalid parsing of UnknownHeaders (f.e. added via ExtensionHeader mechanism) with the same prefix

Byron Campen bcampen at estacado.net
Fri Apr 27 12:27:12 CDT 2007


	Yuck! Good find. I'll apply this immediately.

Best regards,
Byron Campen

> Hi All,
>
> reSIProcate allows to construct and send messages containing headers
> like:
>
>   P-aaabbb: str1
>   P-aaa: str2
>
> (i.e. where the latter header is a prefix of the former one).
> The problem is that the headers are converted into:
>
>   P-aaabbb: str1, str2
>
> by reSIProcate on the receiving side.
>
>
> Please apply the patch that fixes this bug:
>
> Index: resip/stack/SipMessage.cxx
> ===================================================================
> --- resip/stack/SipMessage.cxx	(revision 7094)
> +++ resip/stack/SipMessage.cxx	(working copy)
> @@ -1125,7 +1125,8 @@
>        for (UnknownHeaders::iterator i = mUnknownHeaders.begin();
>             i != mUnknownHeaders.end(); i++)
>        {
> -         if (strncasecmp(i->first.data(), headerName, headerLen)  
> == 0)
> +         if (i->first.size() == headerLen &&
> +             strncasecmp(i->first.data(), headerName, headerLen)  
> == 0)
>           {
>              // add to end of list
>              if (len)
>
> -- 
> ...Bye..Dmitry.
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at list.resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2423 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20070427/f179c862/attachment.bin>


More information about the resiprocate-devel mailing list