[asterisk-commits] mmichelson: trunk r103787 - in /trunk: ./ main/app.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 18 14:53:26 CST 2008


Author: mmichelson
Date: Mon Feb 18 14:53:25 2008
New Revision: 103787

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103787
Log:
Merged revisions 103786 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103786 | mmichelson | 2008-02-18 14:52:09 -0600 (Mon, 18 Feb 2008) | 10 lines

There was an invalid assumption when calculating the duration of a file that the filestream in question
was created properly. Unfortunately this led to a segfault in the situation where an unknown format was
specified in voicemail.conf and a voicemail was recorded. Now, we first check to be sure that the stream
was written correctly or else assume a zero duration.

(closes issue #12021)
Reported by: jakep
Tested by: putnopvut


........

Modified:
    trunk/   (props changed)
    trunk/main/app.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/app.c
URL: http://svn.digium.com/view/asterisk/trunk/main/app.c?view=diff&rev=103787&r1=103786&r2=103787
==============================================================================
--- trunk/main/app.c (original)
+++ trunk/main/app.c Mon Feb 18 14:53:25 2008
@@ -760,7 +760,7 @@
 	 * message, otherwise we could get a situation where this stream is never
 	 * closed (which would create a resource leak).
 	 */
-	*duration = ast_tellstream(others[0]) / 8000;
+	*duration = others[0] ? ast_tellstream(others[0]) / 8000 : 0;
 
 	if (!prepend) {
 		for (x = 0; x < fmtcnt; x++) {




More information about the asterisk-commits mailing list