aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-25 14:40:10 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-25 14:40:10 +0000
commitf303bfe01ff87dd9a677231febf0f82a8260c78b (patch)
tree83c1bd2669db93a938bf41182d2de816a6368b40 /channels
parent551edd2e51a60ce38a529acd627f85af7cbbf359 (diff)
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. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@133572 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index bc93142d0..3bb0ebd2b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13827,6 +13827,7 @@ static int sip_uri_params_cmp(const char *input1, const char *input2)
if (!value2) {
goto fail;
}
+ *value2++ = '\0';
if (!strcasecmp(name1, name2)) {
if (strcasecmp(value1, value2)) {
goto fail;
@@ -13881,6 +13882,7 @@ static int sip_uri_params_cmp(const char *input1, const char *input2)
if (!value2) {
goto fail;
}
+ *value2++ = '\0';
if ((!strcasecmp(name2, "maddr") && !maddrmatch) ||
(!strcasecmp(name2, "ttl") && !ttlmatch) ||
(!strcasecmp(name2, "user") && !usermatch) ||