]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
We need to make sure to null-terminate the "name"
authorMark Michelson <mmichelson@digium.com>
Fri, 25 Jul 2008 14:40:10 +0000 (14:40 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 25 Jul 2008 14:40:10 +0000 (14:40 +0000)
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/branches/1.4@133572 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index bc93142d00e54cfc7fb245385f34e4b26addb3eb..3bb0ebd2bb35b959f61c3758310801cbe53463a1 100644 (file)
@@ -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) ||