From: Mark Michelson Date: Fri, 25 Jul 2008 14:40:10 +0000 (+0000) Subject: We need to make sure to null-terminate the "name" X-Git-Tag: 1.4.22-rc1~65 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a99f3d936543edf6f48f49415f183adcb2ab3aa5;p=thirdparty%2Fasterisk.git 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/branches/1.4@133572 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bc93142d00..3bb0ebd2bb 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) ||