]> 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:59:35 +0000 (23:59 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 11 May 2012 23:59:35 +0000 (23:59 +0000)
commit66a9849c6b2aa27c7787958c51a68fb91c507376
treec76cfbad2b86ec0f36d0c1890b272e370d7eda50
parentde95e541b4d8b154993dc26caf25378205937a59
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

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