mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-18 04:50:11 +01:00
avcodec/hcadec: Check scale_factors
Fixes: out of array read Fixes: 21286/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5683183715876864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -345,6 +345,7 @@ static void unpack(HCAContext *c, ChannelContext *ch,
|
|||||||
} else {
|
} else {
|
||||||
factor += delta - half_max;
|
factor += delta - half_max;
|
||||||
}
|
}
|
||||||
|
factor = av_clip_uintp2(factor, 6);
|
||||||
|
|
||||||
ch->scale_factors[i] = factor;
|
ch->scale_factors[i] = factor;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user