mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/rv40: Test remaining space in loop of get_dimension()
Fixes infinite loop
Fixes: 178/fuzz-3-ffmpeg_VIDEO_AV_CODEC_ID_RV40_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1546d487cf
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8ad4e1c1cb
commit
63caf18787
@ -109,6 +109,8 @@ static int get_dimension(GetBitContext *gb, const int *dim)
|
||||
val = dim[get_bits1(gb) - val];
|
||||
if(!val){
|
||||
do{
|
||||
if (get_bits_left(gb) < 8)
|
||||
return AVERROR_INVALIDDATA;
|
||||
t = get_bits(gb, 8);
|
||||
val += t << 2;
|
||||
}while(t == 0xFF);
|
||||
|
Loading…
Reference in New Issue
Block a user