]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
flacdec: Fix mono output.
authorAndre Noll <maan@systemlinux.org>
Tue, 3 Sep 2013 22:13:41 +0000 (22:13 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 27 Oct 2013 08:40:10 +0000 (09:40 +0100)
In the write callback of the flac decoder we correctly allocate and
fill an output buffer of n * 2 bytes for mono streams, where n is the
block size stored in the frame header. However, later in this function
twice as many bytes are added to the buffer tree. This may result in
a segmentation fault due to reading beyond the allocated buffer.

Fix this by adding n * channels * 2 bytes, which is correct for both
mono and stereo files.


No differences found