Commit bb326795 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/takdec: Check for multiple streaminfo

Fixes: memleak
Fixes: 15446/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5662875831500800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fff2bdc8
...@@ -80,6 +80,8 @@ static int tak_read_header(AVFormatContext *s) ...@@ -80,6 +80,8 @@ static int tak_read_header(AVFormatContext *s)
switch (type) { switch (type) {
case TAK_METADATA_STREAMINFO: case TAK_METADATA_STREAMINFO:
if (st->codecpar->extradata)
return AVERROR_INVALIDDATA;
case TAK_METADATA_LAST_FRAME: case TAK_METADATA_LAST_FRAME:
case TAK_METADATA_ENCODER: case TAK_METADATA_ENCODER:
if (size <= 3) if (size <= 3)
......
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