]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
ensure buffer size is computed properly for ast_copy_string
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 3 May 2005 02:09:16 +0000 (02:09 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 3 May 2005 02:09:16 +0000 (02:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5554 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 412dac3f278ab753102b1f9e067bb27700a4d6f8..d71c0f538fa689f51dd5e38a1ceb0e827d1979d8 100755 (executable)
@@ -1490,7 +1490,7 @@ static int create_addr(struct sip_pvt *r, char *opeer)
                ast_copy_string(r->fullcontact, p->fullcontact, sizeof(r->fullcontact));
                if (!r->initreq.headers && !ast_strlen_zero(p->fromdomain)) {
                        if ((callhost = strchr(r->callid, '@'))) {
-                               ast_copy_string(callhost + 1, p->fromdomain, sizeof(r->callid) - (callhost - r->callid) - 2);
+                               ast_copy_string(callhost + 1, p->fromdomain, sizeof(r->callid) - (callhost - r->callid) - 1);
                        }
                }
                if (ast_strlen_zero(r->tohost)) {