avformat/rka: bps < 8 is invalid

Fixes: division by zero
Fixes: 57828/clusterfuzz-testcase-minimized-ffmpeg_dem_RKA_fuzzer-6571818338353152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fd5aa93a
......@@ -72,7 +72,7 @@ static int rka_read_header(AVFormatContext *s)
if (channels == 0)
return AVERROR_INVALIDDATA;
bps = par->extradata[13];
if (bps == 0)
if (bps < 8)
return AVERROR_INVALIDDATA;
size_offset = avio_rl32(s->pb);
framepos = avio_tell(s->pb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment