[OpenSIPS-Devel] [ opensips-Bugs-2202134 ] "strncmp" should not be used to match header names
SourceForge.net
noreply at sourceforge.net
Tue Oct 28 00:03:09 CET 2008
Bugs item #2202134, was opened at 2008-10-28 00:03
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: core
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Iñaki Baz (ibc_sf)
Assigned to: Nobody/Anonymous (nobody)
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)
----------------------------------------------------------------------
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