mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
avcodec/cavsdec: Check alpha/beta offset
Fixes: Integer overflow Fixes: 6183/clusterfuzz-testcase-minimized-6269224436629504 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
4f8c691040
commit
ae2eb04648
@ -1067,6 +1067,11 @@ static int decode_pic(AVSContext *h)
|
||||
if (!h->loop_filter_disable && get_bits1(&h->gb)) {
|
||||
h->alpha_offset = get_se_golomb(&h->gb);
|
||||
h->beta_offset = get_se_golomb(&h->gb);
|
||||
if ( h->alpha_offset < -64 || h->alpha_offset > 64
|
||||
|| h-> beta_offset < -64 || h-> beta_offset > 64) {
|
||||
h->alpha_offset = h->beta_offset = 0;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
} else {
|
||||
h->alpha_offset = h->beta_offset = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user