mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-21 23:10:13 +00:00
idcin: check return value of av_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
51f1bf3309
commit
16e0416fa4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user