[asterisk-commits] mmichelson: branch 1.4 r133572 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 25 09:40:10 CDT 2008


Author: mmichelson
Date: Fri Jul 25 09:40:10 2008
New Revision: 133572

URL: http://svn.digium.com/view/asterisk?view=rev&rev=133572
Log:
We need to make sure to null-terminate the "name"
portion of SIP URI parameters so that there are no
bogus comparisons.

Thanks to bbryant for pointing this out.


Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=133572&r1=133571&r2=133572
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Fri Jul 25 09:40:10 2008
@@ -13827,6 +13827,7 @@
 			if (!value2) {
 				goto fail;
 			}
+			*value2++ = '\0';
 			if (!strcasecmp(name1, name2)) {
 				if (strcasecmp(value1, value2)) {
 					goto fail;
@@ -13881,6 +13882,7 @@
 		if (!value2) {
 			goto fail;
 		}
+		*value2++ = '\0';
 		if ((!strcasecmp(name2, "maddr") && !maddrmatch) ||
 				(!strcasecmp(name2, "ttl") && !ttlmatch) ||
 				(!strcasecmp(name2, "user") && !usermatch) ||




More information about the asterisk-commits mailing list