Merged revisions 133572 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Fri, 25 Jul 2008 14:40:52 +0000 (14:40 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 25 Jul 2008 14:40:52 +0000 (14:40 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r133572 | mmichelson | 2008-07-25 09:40:10 -0500 (Fri, 25 Jul 2008) | 7 lines

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: https://origsvn.digium.com/svn/asterisk/trunk@133573 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 55d5d97..89cf846 100644 (file)
@@ -16805,6 +16805,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;
@@ -16859,6 +16860,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) ||