diff options
author | bweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-10 18:10:50 +0000 |
---|---|---|
committer | bweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-12-10 18:10:50 +0000 |
commit | 2f16f0b5118bced8ee5f8fdb1163256ef180e437 (patch) | |
tree | 56f08d2a652b0888d6c44af603dddc9b31ee6837 /channels/chan_zap.c | |
parent | 827a8169bef04af0fa3ad72e42330689b66ba78d (diff) |
Bug #5877
Make sure the digit string from E&M wink DNIS collection is properly null terminated as it grows.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7425 f38db490-d61c-443f-a65b-d21fe96a405b
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 79ae6c921..4a59a58f6 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -5221,6 +5221,7 @@ static void *ss_thread(void *data) return NULL; } else if (res) { exten[len++] = res; + exten[len] = '\0'; } else break; } @@ -5327,6 +5328,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; @@ -5340,6 +5342,7 @@ static void *ss_thread(void *data) return NULL; } else if (res) { dtmfbuf[len++] = res; + dtmfbuf[len] = '\0'; } else { break; } |