[asterisk-commits] russell: branch 1.6.1 r166775 - in /branches/1.6.1: ./ channels/misdn_config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Dec 28 09:16:12 CST 2008


Author: russell
Date: Sun Dec 28 09:16:11 2008
New Revision: 166775

URL: http://svn.digium.com/view/asterisk?view=rev&rev=166775
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.1/   (props changed)
    branches/1.6.1/channels/misdn_config.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/misdn_config.c?view=diff&rev=166775&r1=166774&r2=166775
==============================================================================
--- branches/1.6.1/channels/misdn_config.c (original)
+++ branches/1.6.1/channels/misdn_config.c Sun Dec 28 09:16:11 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 asterisk-commits mailing list