[OpenSIPS-Devel] [ opensips-Bugs-2202134 ] "strncmp" should not be used to match header names
SourceForge.net
noreply at sourceforge.net
Tue Oct 28 10:26:34 CET 2008
Bugs item #2202134, was opened at 2008-10-28 01:03
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2202134&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Iñaki Baz (ibc_sf)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: "strncmp" should not be used to match header names
Initial Comment:
All those results are bugs since they expect header names being case sensitive:
~# /usr/src/opensips-trunk/sources/modules$ grep -ri "strncmp(h" * | grep -v svn
peering/verify.c: if (strncmp(hf->name.s, "P-Request-Hash",
presence/publish.c: if(strncmp(hdr->name.s, "SIP-If-Match",12)==0||
presence/publish.c: strncmp(hdr->name.s,"Sip-If-Match",12)==0 )
pua/send_publish.c: if(strncmp(hdr->name.s, "SIP-ETag",8)==0 )
pua_bla/notify.c: if(strncmp(hdr->name.s, "Subscription-State",18)==0 )
pua_mi/mi_func.c: if(strncmp(hdr->name.s, "SIP-ETag",8)==0 )
pua_xmpp/simple2xmpp.c: if(strncmp(hdr->name.s, "Subscription-State",18)==0 )
pua_xmpp/simple2xmpp.c: if(strncmp(hdr->name.s, "Subscription-State",18)==0 )
pua_xmpp/simple2xmpp.c: if(hdr && strncmp(hdr->body.s,"terminated", 10)== 0)
rls/subscribe.c: if(strncmp(hdr->name.s, "Support", 7)== 0)
rls/subscribe.c: if(strncmp(hdr->body.s+ i, "eventlist", 9)== 0)
rls/resource_notify.c: if(strncmp(hdr->name.s, "Subscription-State", 18)==0)
----------------------------------------------------------------------
Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-10-28 11:23
Message:
OK - the fix is available on SVN trunk - after some testing, I will prepare
a backport on 1.4.
Thanks and regards,
Bogdan
----------------------------------------------------------------------
Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-10-28 10:13
Message:
Hi Iñaki,
I agree with this - I will do the changes.
Regards,
Bogdan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2202134&group_id=232389
More information about the Devel
mailing list