[Kamailio-Devel] [ openser-Feature Requests-2202141 ] "strncmp" should not be used to match header names
SourceForge.net
noreply at sourceforge.net
Tue Oct 28 00:05:52 CET 2008
Feature Requests item #2202141, was opened at 2008-10-28 00:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=2202141&group_id=139143
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: ver devel
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
while SIP syntax is case insensitive in header names:
/usr/src/kamailio-trunk$ grep -ri "strncmp(h" * | grep -v svn
sources/modules/peering/verify.c: if (strncmp(hf->name.s, "P-Request-Hash",
sources/modules/pua_bla/notify.c: if(strncmp(hdr->name.s, "Subscription-State",18)==0 )
sources/modules/rls/subscribe.c: if(strncmp(hdr->name.s, "Support", 7)== 0)
sources/modules/rls/subscribe.c: if(strncmp(hdr->body.s+ i, "eventlist", 9)== 0)
sources/modules/rls/resource_notify.c: if(strncmp(hdr->name.s, "Subscription-State", 18)==0)
sources/modules/pua_mi/mi_func.c: if(strncmp(hdr->name.s, "SIP-ETag",8)==0 )
sources/modules/pua/send_publish.c: if(strncmp(hdr->name.s, "SIP-ETag",8)==0 )
sources/modules/pua_xmpp/simple2xmpp.c: if(strncmp(hdr->name.s, "Subscription-State",18)==0 )
sources/modules/pua_xmpp/simple2xmpp.c: if(strncmp(hdr->name.s, "Subscription-State",18)==0 )
sources/modules/pua_xmpp/simple2xmpp.c: if(hdr && strncmp(hdr->body.s,"terminated", 10)== 0)
sources/modules/presence/publish.c: if(strncmp(hdr->name.s, "SIP-If-Match",12)==0||
sources/modules/presence/publish.c: strncmp(hdr->name.s,"Sip-If-Match",12)==0 )
sources/msg_translator.c: if (he && (strncmp(he->h_name, name->s, name->len)==0))
sources/msg_translator.c: if (strncmp(he->h_aliases[i],name->s, name->len)==0)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=2202141&group_id=139143
More information about the Devel
mailing list