mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-16 09:52:24 +00:00
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/branches/1.2@7425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user