You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/wavarc: Check k
Fixes: Assertion failure Fixes: 55849/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-6590105973555200 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:
@@ -192,6 +192,8 @@ static int decode_1dif(AVCodecContext *avctx,
|
|||||||
if (block_type < 4 && block_type >= 0) {
|
if (block_type < 4 && block_type >= 0) {
|
||||||
k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
|
k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
|
||||||
k = get_urice(gb, k) + 1;
|
k = get_urice(gb, k) + 1;
|
||||||
|
if (k > 32)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (block_type) {
|
switch (block_type) {
|
||||||
@@ -282,6 +284,8 @@ static int decode_2slp(AVCodecContext *avctx,
|
|||||||
if (block_type < 5 && block_type >= 0) {
|
if (block_type < 5 && block_type >= 0) {
|
||||||
k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
|
k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
|
||||||
k = get_urice(gb, k) + 1;
|
k = get_urice(gb, k) + 1;
|
||||||
|
if (k > 32)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (block_type) {
|
switch (block_type) {
|
||||||
|
Reference in New Issue
Block a user