mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-30 20:19:42 -07:00
Avoid a crash in the handling of DTMF based Caller ID. It is valid for
ast_read to return NULL in the case that the channel has been hung up. (crash reported by anonymouz666 on IRC in #asterisk-dev) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -6111,6 +6111,8 @@ static void *ss_thread(void *data)
|
||||
return NULL;
|
||||
}
|
||||
f = ast_read(chan);
|
||||
if (!f)
|
||||
break;
|
||||
if (f->frametype == AST_FRAME_DTMF) {
|
||||
dtmfbuf[i++] = f->subclass;
|
||||
ast_log(LOG_DEBUG, "CID got digit '%c'\n", f->subclass);
|
||||
|
||||
Reference in New Issue
Block a user