]> git.ipfire.org Git - thirdparty/asterisk.git/commit
format_mp3: Fix a possible crash in mp3_read().
authorRussell Bryant <russell@russellbryant.com>
Fri, 11 May 2012 23:53:38 +0000 (23:53 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 11 May 2012 23:53:38 +0000 (23:53 +0000)
commitdac30f1523fd1db6809f5dbb498010dd48cd18f3
treebfc19f7a96da639fd347bd7a45445bcd4cba58d6
parent91154705dfb5518ad014c72c255841170fd0f8fc
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@366296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
addons/format_mp3.c