[asterisk-commits] kpfleming: trunk r147689 - in /trunk: ./	channels/chan_dahdi.c
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Wed Oct  8 17:26:56 CDT 2008
    
    
  
Author: kpfleming
Date: Wed Oct  8 17:26:55 2008
New Revision: 147689
URL: http://svn.digium.com/view/asterisk?view=rev&rev=147689
Log:
Merged revisions 147681 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
  r147681 | kpfleming | 2008-10-08 17:22:09 -0500 (Wed, 08 Oct 2008) | 3 lines
  
  when parsing a text configuration option, ensure that the buffer on the stack is actually large enough to hold the legal values of that option, and also ensure that sscanf() knows to stop parsing if it would overrun the buffer (without these changes, specifying "buffers=...,immediate" would overflow the buffer on the stack, and could not have worked as expected)
........
Modified:
    trunk/   (props changed)
    trunk/channels/chan_dahdi.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=147689&r1=147688&r2=147689
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Wed Oct  8 17:26:55 2008
@@ -13655,8 +13655,9 @@
  					return -1;
 		} else if (!strcasecmp(v->name, "buffers")) {
 			int res;
-			char policy[8] = "";
-			res = sscanf(v->value, "%d,%s", &confp->chan.buf_no, policy);
+			char policy[21] = "";
+
+			res = sscanf(v->value, "%d,%20s", &confp->chan.buf_no, policy);
 			if (res != 2) {
 				ast_log(LOG_WARNING, "Parsing buffers option data failed, using defaults.\n");
 				confp->chan.buf_no = numbufs;
    
    
More information about the asterisk-commits
mailing list