[asterisk-commits] mmichelson: branch 1.6.0 r171623 - in /branches/1.6.0: ./ main/slinfactory.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 27 14:13:17 CST 2009
Author: mmichelson
Date: Tue Jan 27 14:13:17 2009
New Revision: 171623
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=171623
Log:
Merged revisions 171622 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r171622 | mmichelson | 2009-01-27 14:11:30 -0600 (Tue, 27 Jan 2009) | 26 lines
Merged revisions 171621 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r171621 | mmichelson | 2009-01-27 14:06:01 -0600 (Tue, 27 Jan 2009) | 18 lines
Prevent a crash from occurring when a jitter buffer interpolated frame is
removed from a slinfactory
slinfactory used the "samples" field of an ast_frame in order to determine
the amount of data contained within the frame. In certain cases, such as
jitter buffer interpolated frames, the frame would have a non-zero value for
"samples" but have NULL "data"
This caused a problem when a memcpy call in ast_slinfactory_read would attempt
to access invalid memory. The solution in use here is to never feed frames into
the slinfactory if they have NULL "data"
(closes issue #13116)
Reported by: aragon
Patches:
13116.diff uploaded by putnopvut (license 60)
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/main/slinfactory.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/main/slinfactory.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/slinfactory.c?view=diff&rev=171623&r1=171622&r2=171623
==============================================================================
--- branches/1.6.0/main/slinfactory.c (original)
+++ branches/1.6.0/main/slinfactory.c Tue Jan 27 14:13:17 2009
@@ -55,6 +55,16 @@
{
struct ast_frame *begin_frame = f, *duped_frame = NULL, *frame_ptr;
unsigned int x;
+
+ /* In some cases, we can be passed a frame which has no data in it, but
+ * which has a positive number of samples defined. Once such situation is
+ * when a jitter buffer is in use and the jitter buffer interpolates a frame.
+ * The frame it produces has data set to NULL, datalen set to 0, and samples
+ * set to either 160 or 240.
+ */
+ if (!f->data) {
+ return 0;
+ }
if (f->subclass != AST_FORMAT_SLINEAR && f->subclass != AST_FORMAT_SLINEAR16) {
if (sf->trans && f->subclass != sf->format) {
More information about the asterisk-commits
mailing list