Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv4486
Modified Files:
chan_sip.c
Log Message:
ensure buffer size is computed properly for ast_copy_string
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.718
retrieving revision 1.719
diff -u -d -r1.718 -r1.719
--- chan_sip.c 2 May 2005 13:44:38 -0000 1.718
+++ chan_sip.c 3 May 2005 02:09:16 -0000 1.719
@@ -1490,7 +1490,7 @@
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)) {
_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs