Commit Graph

8 Commits

Author SHA1 Message Date
Russell Bryant 4a2678b561 format_mp3: Fix a possible crash in mp3_read().
This patch fixes a potential crash in mp3_read() by not assuming that
dbuf has enough data to finish filling up the output buffer.  The patch
also makes sure that the dbuf state gets reset after we know we read
everything out of it already.

In passing, this patch includes some other cleanups of this module,
including stripping trailing whitespace, formatting fixes based on
coding guidelines, and removing a number of unused members from the
private state struct.

(closes issue ASTERISK-19761)
Reported by: Chris Maciejewsk
Tested by: Chris Maciejewsk
........

Merged revisions 366296 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 366297 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-12 00:03:42 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

Review: https://reviewboard.asterisk.org/r/1083/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Sean Bright f0190a1092 Fix reading samples from format_mp3 after ast_seekstream/ast_tellstream.
There is a bug when using ast_seekstream/ast_tellstream with format_mp3 in that
the file read position is not reset before attempting to read samples.  So when
we seek to determine the maximum size of the file (as in res_agi's STREAM FILE)
we weren't then resetting the file pointer so that we could properly read
samples.  This patch addresses that (in a similar manner to format_wav.c).

(closes issue #15224)
Reported by: rbd
Patches:
      20091230_addons_1.4_issue15224.diff uploaded by seanbright (license 71)
Tested by: rbd, seanbright

Review: https://reviewboard.asterisk.org/r/453


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@238014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-06 15:35:43 +00:00
Tilghman Lesher 8f336e3d01 Fix trunk building
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 16:13:50 +00:00
Russell Bryant cea6ee4143 Fix audio problems with format_mp3.
This problem was introduced when the AST_FRIENDLY_OFFSET patch was merged.
I'm surprised that nobody noticed any trouble when testing that patch, but this
fixes the code that fills in the buffer to start filling in after the offset
portion of the buffer.

(closes issue #15850)
Reported by: 99gixxer
Patches:
      issue15850.diff1.txt uploaded by russell (license 2)
Tested by: 99gixxer


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 18:06:57 +00:00
Russell Bryant 078b0b0eff Fix memory corruption caused by format_mp3.
format_mp3 claimed that it provided AST_FRIENDLY_OFFSET in frames returned by
read().  However, it lied.  This means that other parts of the code that
attempted to make use of the offset buffer would end up corrupting the fields
in the ast_filestream structure.  This resulted in quite a few crashes due to
unexpected values for fields in ast_filestream.

This patch closes out quite a few bugs.  However, some of these bugs have been
open for a while and have been an area where more than one bug has been
discussed.  So with that said, anyone that is following one of the issues
closed here, if you still have a problem, please open a new bug report for the
specific problem you are still having.  If you do, please ensure that the bug
report is based on the newest version of Asterisk, and that this patch is
applied if format_mp3 is in use.  Thanks!

(closes issue #15109)
Reported by: jvandal
Tested by: aragon, russell, zerohalo, marhbere, rgj

(closes issue #14958)
Reported by: aragon

(closes issue #15123)
Reported by: axisinternet

(closes issue #15041)
Reported by: maxnuv

(closes issue #15396)
Reported by: aragon

(closes issue #15195)
Reported by: amorsen
Tested by: amorsen

(closes issue #15781)
Reported by: jensvb

(closes issue #15735)
Reported by: thom4fun

(closes issue #15460)
Reported by: marhbere


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-01 20:44:13 +00:00
Russell Bryant c511a26749 Move Asterisk-addons modules into the main Asterisk source tree.
Someone asked yesterday, "is there a good reason why we can't just put these
modules in Asterisk?".  After a brief discussion, as long as the modules are
clearly set aside in their own directory and not enabled by default, it is
perfectly fine.

For more information about why a module goes in addons, see README-addons.txt.

chan_ooh323 does not currently compile as it is behind some trunk API updates.
However, it will not build by default, so it should be okay for now.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-30 16:40:38 +00:00