[svn-commits] russell: trunk r166773 - in /trunk: ./ channels/misdn_config.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Dec 28 09:15:15 CST 2008
Author: russell
Date: Sun Dec 28 09:15:14 2008
New Revision: 166773
URL: http://svn.digium.com/view/asterisk?view=rev&rev=166773
Log:
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:
trunk/ (props changed)
trunk/channels/misdn_config.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn_config.c?view=diff&rev=166773&r1=166772&r2=166773
==============================================================================
--- trunk/channels/misdn_config.c (original)
+++ trunk/channels/misdn_config.c Sun Dec 28 09:15:14 2008
@@ -790,8 +790,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 svn-commits
mailing list