[asterisk-commits] jpeeler: branch 1.6.2 r231930 - in /branches/1.6.2: ./ main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 1 16:03:23 CST 2009
Author: jpeeler
Date: Tue Dec 1 16:03:18 2009
New Revision: 231930
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=231930
Log:
Merged revisions 231927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r231927 | jpeeler | 2009-12-01 15:54:21 -0600 (Tue, 01 Dec 2009) | 19 lines
Merged revisions 231911 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r231911 | jpeeler | 2009-12-01 15:29:31 -0600 (Tue, 01 Dec 2009) | 12 lines
Fix crash with invalid frame data
The crash was happening as a result of a frame containing an invalid data
pointer, but was set with data length of zero. The few times the issue was
reproduced it _seemed_ that the frame was queued properly, that is the data
pointer was set to NULL. I never could reproduce the crash so as a last resort
the crash has been fixed, but a check in __ast_read has been added to give as
much information about the source of problematic frames in the future.
(closes issue #16058)
Reported by: atis
........
................
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/main/channel.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/channel.c?view=diff&rev=231930&r1=231929&r2=231930
==============================================================================
--- branches/1.6.2/main/channel.c (original)
+++ branches/1.6.2/main/channel.c Tue Dec 1 16:03:18 2009
@@ -3039,6 +3039,17 @@
ast_frame_dump(chan->name, f, "<<");
chan->fin = FRAMECOUNT_INC(chan->fin);
+ if (f && f->datalen == 0 && f->data.ptr) {
+ /* fix invalid pointer */
+ f->data.ptr = NULL;
+#ifdef AST_DEVMODE
+ ast_log(LOG_ERROR, "Found frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
+ ast_frame_dump(chan->name, f, "<<");
+#else
+ ast_debug(3, "Found frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
+#endif
+ }
+
done:
if (chan->music_state && chan->generator && chan->generator->digit && f && f->frametype == AST_FRAME_DTMF_END)
chan->generator->digit(chan, f->subclass);
More information about the asterisk-commits
mailing list