diff options
author | BJ Weschke <bweschke@btwtech.com> | 2005-12-10 18:05:00 +0000 |
---|---|---|
committer | BJ Weschke <bweschke@btwtech.com> | 2005-12-10 18:05:00 +0000 |
commit | 8ef327b3f5f7fc440d782a03ab9b9c9b7c2a5f3f (patch) | |
tree | cef967c88a30c8a85cea7c1400d2bf7ee2804cba /channels/chan_zap.c | |
parent | 7dfa72cdee99501e13f3dab014847c9565eb172a (diff) |
Bug #5877
Make sure the digit string from E&M wink DNIS collection is properly null terminated as it grows.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r-- | channels/chan_zap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 16644eae3..9aeadf591 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -5269,6 +5269,7 @@ static void *ss_thread(void *data) return NULL; } else if (res) { exten[len++] = res; + exten[len] = '\0'; } else break; } @@ -5375,6 +5376,7 @@ static void *ss_thread(void *data) 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; @@ -5388,6 +5390,7 @@ static void *ss_thread(void *data) return NULL; } else if (res) { dtmfbuf[len++] = res; + dtmfbuf[len] = '\0'; } else { break; } |