Commit 8e41675e authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/vividas: Check if extradata was read successfully

Fixes: OOM
Fixes: 15575/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5654666781655040

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1cf2f040
......@@ -386,7 +386,12 @@ static void track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t
offset += av_xiphlacing(&p[offset], data_len[j]);
for (j = 0; j < num_data; j++) {
avio_read(pb, &p[offset], data_len[j]);
int ret = avio_read(pb, &p[offset], data_len[j]);
if (ret < data_len[j]) {
st->codecpar->extradata_size = 0;
av_freep(&st->codecpar->extradata);
break;
}
offset += data_len[j];
}
......
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