Commit 80aa89bd authored by Michael Niedermayer's avatar Michael Niedermayer

asfdec: check extradata size before alloc and read

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 936eaa89
......@@ -444,7 +444,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
tag1 = avio_rl32(pb);
avio_skip(pb, 20);
if (sizeX > 40) {
st->codec->extradata_size = sizeX - 40;
st->codec->extradata_size = ffio_limit(pb, sizeX - 40);
st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
avio_read(pb, st->codec->extradata, st->codec->extradata_size);
}
......
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