mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avcodec/wavarc: Check k in decode_5elp()
regression since 18b2ecc247
Fixes: assertion failure
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-6280165808013312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
dbcf285abd
commit
9cef555bc5
1 changed files with 2 additions and 0 deletions
|
|
@ -539,6 +539,8 @@ static int decode_5elp(AVCodecContext *avctx,
|
|||
if (block_type >= 0 && block_type <= 7) {
|
||||
k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
|
||||
k = get_urice(gb, k) + 1;
|
||||
if (k >= 32)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (block_type <= 2 || block_type == 6 || block_type == 13 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue