diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-07-01 21:37:16 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-07-01 21:37:16 +0000 |
commit | 51f1bf3309695b5f20d4f0e0ff90e54854c206d2 (patch) | |
tree | 2f7c54092c2677eed5de8efbe6a1e805f9ee94da | |
parent | b791a0831b0a027e7ba4eb6961cc0180472ac603 (diff) | |
download | ffmpeg-51f1bf3309695b5f20d4f0e0ff90e54854c206d2.tar.gz |
bfi: check return value of av_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavformat/bfi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/bfi.c b/libavformat/bfi.c index a28e09a4f1..7a4f436bf3 100644 --- a/libavformat/bfi.c +++ b/libavformat/bfi.c @@ -81,6 +81,8 @@ static int bfi_read_header(AVFormatContext * s) /*Load the palette to extradata */ avio_skip(pb, 8); vstream->codec->extradata = av_malloc(768); + if (!vstream->codec->extradata) + return AVERROR(ENOMEM); vstream->codec->extradata_size = 768; avio_read(pb, vstream->codec->extradata, vstream->codec->extradata_size); |