Commit 16e0416f authored by Paul B Mahol's avatar Paul B Mahol

idcin: check return value of av_malloc()

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 51f1bf33
......@@ -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;
......
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