提交 652ea23c 编写于 作者: M Michael Niedermayer

avformat/realtextdec: Check for duplicate extradata in realtext_read_header()

Fixes: memleak
Fixes: 16140/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5684008052064256

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 76133d7c
......@@ -87,6 +87,10 @@ static int realtext_read_header(AVFormatContext *s)
/* save header to extradata */
const char *p = ff_smil_get_attr_ptr(buf.str, "duration");
if (st->codecpar->extradata) {
res = AVERROR_INVALIDDATA;
goto end;
}
if (p)
duration = read_ts(p);
st->codecpar->extradata = av_strdup(buf.str);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册