aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authorbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-10 18:10:50 +0000
committerbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-10 18:10:50 +0000
commit2f16f0b5118bced8ee5f8fdb1163256ef180e437 (patch)
tree56f08d2a652b0888d6c44af603dddc9b31ee6837 /channels/chan_zap.c
parent827a8169bef04af0fa3ad72e42330689b66ba78d (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.c3
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;
}