[asterisk-commits] russell: branch 1.6.0 r166774 - in /branches/1.6.0: ./ channels/misdn_config.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Dec 28 09:15:46 CST 2008
Author: russell
Date: Sun Dec 28 09:15:46 2008
New Revision: 166774
URL: http://svn.digium.com/view/asterisk?view=rev&rev=166774
Log:
Merged revisions 166773 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r166773 | russell | 2008-12-28 09:15:14 -0600 (Sun, 28 Dec 2008) | 12 lines
Merged revisions 166772 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r166772 | russell | 2008-12-28 09:13:48 -0600 (Sun, 28 Dec 2008) | 4 lines
Use strncat() instead of an sprintf() in which source and target buffers overlap
http://lists.digium.com/pipermail/asterisk-dev/2008-December/035919.html
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/channels/misdn_config.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/misdn_config.c?view=diff&rev=166774&r1=166773&r2=166774
==============================================================================
--- branches/1.6.0/channels/misdn_config.c (original)
+++ branches/1.6.0/channels/misdn_config.c Sun Dec 28 09:15:46 2008
@@ -793,8 +793,9 @@
else
iter = port_cfg[0][place].ml;
if (iter) {
- for (; iter; iter = iter->next)
- sprintf(tempbuf, "%s%s, ", tempbuf, iter->msn);
+ for (; iter; iter = iter->next) {
+ strncat(tempbuf, iter->msn, sizeof(tempbuf) - strlen(tempbuf) - 1);
+ }
tempbuf[strlen(tempbuf)-2] = 0;
}
snprintf(buf, bufsize, " -> msns: %s", *tempbuf ? tempbuf : "none");
More information about the asterisk-commits
mailing list