diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-07-02 02:04:48 +0400 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-07-02 02:04:48 +0400 |
commit | 16e0416fa47ca391214ad20d162240e5d492bf0e (patch) | |
tree | 604c861d508638c8470b9dc252b34ddc2e4bee50 /libavformat/idcin.c | |
parent | 51f1bf3309695b5f20d4f0e0ff90e54854c206d2 (diff) |
idcin: check return value of av_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/idcin.c')
-rw-r--r-- | libavformat/idcin.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/idcin.c b/libavformat/idcin.c index 31d34f38fc..85d538c4f3 100644 --- a/libavformat/idcin.c +++ b/libavformat/idcin.c @@ -196,8 +196,10 @@ static int idcin_read_header(AVFormatContext *s) st->codec->height = height; /* load up the Huffman tables into extradata */ - st->codec->extradata_size = HUFFMAN_TABLE_SIZE; st->codec->extradata = av_malloc(HUFFMAN_TABLE_SIZE); + if (!st->codec->extradata) + return AVERROR(ENOMEM); + st->codec->extradata_size = HUFFMAN_TABLE_SIZE; ret = avio_read(pb, st->codec->extradata, HUFFMAN_TABLE_SIZE); if (ret < 0) { return ret; |