Commit 81f231b5 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/asfdec: check return value of av_mallocz()

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 5e66d8ac
...@@ -465,6 +465,8 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size) ...@@ -465,6 +465,8 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
st->codec->extradata_size = ffio_limit(pb, sizeX - 40); st->codec->extradata_size = ffio_limit(pb, sizeX - 40);
st->codec->extradata = av_mallocz(st->codec->extradata_size + st->codec->extradata = av_mallocz(st->codec->extradata_size +
FF_INPUT_BUFFER_PADDING_SIZE); FF_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
avio_read(pb, st->codec->extradata, st->codec->extradata_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