mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
wavpack: validate samples size parsed in wavpack_decode_block
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit ed50673066)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/wavpack.c
This commit is contained in:
committed by
Reinhard Tartler
parent
d26bc6c6b6
commit
6711d410dc
@@ -790,6 +790,9 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
|
|||||||
|
|
||||||
if (!wc->mkv_mode) {
|
if (!wc->mkv_mode) {
|
||||||
s->samples = AV_RL32(buf); buf += 4;
|
s->samples = AV_RL32(buf); buf += 4;
|
||||||
|
if (s->samples != wc->samples)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if (!s->samples) {
|
if (!s->samples) {
|
||||||
*got_frame_ptr = 0;
|
*got_frame_ptr = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user