[svn-commits] mmichelson: branch 1.4 r103786 - /branches/1.4/main/app.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Feb 18 14:52:09 CST 2008
Author: mmichelson
Date: Mon Feb 18 14:52:09 2008
New Revision: 103786
URL: http://svn.digium.com/view/asterisk?view=rev&rev=103786
Log:
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:
branches/1.4/main/app.c
Modified: branches/1.4/main/app.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/app.c?view=diff&rev=103786&r1=103785&r2=103786
==============================================================================
--- branches/1.4/main/app.c (original)
+++ branches/1.4/main/app.c Mon Feb 18 14:52:09 2008
@@ -707,7 +707,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 svn-commits
mailing list