Browse Source

bink demuxer: check malloc return value

tags/n1.2
Anton Khirnov 13 years ago
parent
commit
1730ca2eca
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/bink.c

+ 2
- 0
libavformat/bink.c View File

@@ -116,6 +116,8 @@ static int read_header(AVFormatContext *s)
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = AV_CODEC_ID_BINKVIDEO;
vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
if (!vst->codec->extradata)
return AVERROR(ENOMEM);
vst->codec->extradata_size = 4;
avio_read(pb, vst->codec->extradata, 4);



Loading…
Cancel
Save