Browse Source

avcodec/asfdec: check return value of av_mallocz()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n2.1
Paul B Mahol 11 years ago
parent
commit
81f231b5c7
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/asfdec.c

+ 2
- 0
libavformat/asfdec.c View File

@@ -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 = av_mallocz(st->codec->extradata_size +
FF_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
avio_read(pb, st->codec->extradata, st->codec->extradata_size);
}



Loading…
Cancel
Save