wavpackenc: proper buffer allocation
authorChristophe Gisquet <christophe.gisquet@gmail.com>
Tue, 19 Aug 2014 12:26:49 +0000 (12:26 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 3 Oct 2014 00:51:57 +0000 (02:51 +0200)
commit25864cf562c3c7571a27408e17b8ad39a6fd9cdc
treeee272ed9f7d6b99a842e759f6c0234d8095ca826
parentf74206cb40ee966ebb1b1bb2e1a4efe92d1206e0
wavpackenc: proper buffer allocation

The allocation didn't account for headers, that can be easily 79 bytes.
As a result, buffers allocated for a few samples (e.g. 5 in the original
bug) could be undersized.

Fixed ticket #2881.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2ba58bec20b0039ccc40cfba59af6d56de16e8b1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wavpackenc.c