[svn-commits] russell: branch 1.4 r79912 - /branches/1.4/channels/chan_zap.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 17 16:01:44 CDT 2007


Author: russell
Date: Fri Aug 17 16:01:43 2007
New Revision: 79912

URL: http://svn.digium.com/view/asterisk?view=rev&rev=79912
Log:
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)

Modified:
    branches/1.4/channels/chan_zap.c

Modified: branches/1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_zap.c?view=diff&rev=79912&r1=79911&r2=79912
==============================================================================
--- branches/1.4/channels/chan_zap.c (original)
+++ branches/1.4/channels/chan_zap.c Fri Aug 17 16:01:43 2007
@@ -6111,6 +6111,8 @@
 						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);




More information about the svn-commits mailing list