]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp3dec: Avoid possible endless loop.
authorAndre Noll <maan@systemlinux.org>
Wed, 31 Aug 2011 03:32:04 +0000 (05:32 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 9 Sep 2011 21:28:11 +0000 (23:28 +0200)
commit1af4a7ef07156a4c6d13aa62b326e3e669ea414a
treeaa1500d81fa30458d9eed815895f484d4b36e25b
parent663860bf5e3e3df1081900ed03d8cc63c483b42d
mp3dec: Avoid possible endless loop.

If an error occurs during frame decode at the end of an 8K buffer,
the code in mp3dec.c might loop forever because we miss to consume
the data of all frames that have been decoded so far during this
iteration of the scheduler loop.

The two callers of used_mad_buffer_bytes() both call btr_consume()
next, and this fix requires to call the same two function once more
from another location. So it is natural to move the btr_consume()
call into used_mad_buffer_bytes() and rename the latter function
to mp3dec_consume().
mp3dec_filter.c