[Kamailio-Devel] "strncmp" should not be used to match header names
Iñaki Baz Castillo
ibc at aliax.net
Tue Oct 28 00:01:22 CET 2008
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)
--
Iñaki Baz Castillo
More information about the Devel
mailing list