[svn-commits] branch 1.2 - r7425 /branches/1.2/channels/chan_zap.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sat Dec 10 12:10:52 CST 2005


Author: bweschke
Date: Sat Dec 10 12:10:50 2005
New Revision: 7425

URL: http://svn.digium.com/view/asterisk?rev=7425&view=rev
Log:
 Bug #5877
 Make sure the digit string from E&M wink DNIS collection is properly null terminated as it grows.


Modified:
    branches/1.2/channels/chan_zap.c

Modified: branches/1.2/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_zap.c?rev=7425&r1=7424&r2=7425&view=diff
==============================================================================
--- branches/1.2/channels/chan_zap.c (original)
+++ branches/1.2/channels/chan_zap.c Sat Dec 10 12:10:50 2005
@@ -5221,6 +5221,7 @@
 				return NULL;
 			} else if (res) {
 				exten[len++] = res;
+				exten[len] = '\0';
 			} else
 				break;
 		}
@@ -5327,6 +5328,7 @@
 			default:
 				/* If we got the first digit, get the rest */
 				len = 1;
+				dtmfbuf[len] = '\0';
 				while((len < AST_MAX_EXTENSION-1) && ast_matchmore_extension(chan, chan->context, dtmfbuf, 1, p->cid_num)) {
 					if (ast_exists_extension(chan, chan->context, dtmfbuf, 1, p->cid_num)) {
 						timeout = matchdigittimeout;
@@ -5340,6 +5342,7 @@
 						return NULL;
 					} else if (res) {
 						dtmfbuf[len++] = res;
+						dtmfbuf[len] = '\0';
 					} else {
 						break;
 					}



More information about the svn-commits mailing list