diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-20 16:55:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-20 16:55:43 +0200 |
commit | 2c1e075308e14810149f53be87959a62cb83a730 (patch) | |
tree | f11990fd055e7da0e95b8d5c5225cde896a09bb1 /libavformat | |
parent | b294a4beec24d07903c4aefb8ca26cc154fdd5ac (diff) | |
download | ffmpeg-streaming-2c1e075308e14810149f53be87959a62cb83a730.zip ffmpeg-streaming-2c1e075308e14810149f53be87959a62cb83a730.tar.gz |
avformat/oggparseflac: check ff_alloc_extradata() return code
Fixes CID1108573
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/oggparseflac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c index 894b438..f69533f 100644 --- a/libavformat/oggparseflac.c +++ b/libavformat/oggparseflac.c @@ -62,7 +62,8 @@ flac_header (AVFormatContext * s, int idx) st->codec->codec_id = AV_CODEC_ID_FLAC; st->need_parsing = AVSTREAM_PARSE_HEADERS; - ff_alloc_extradata(st->codec, FLAC_STREAMINFO_SIZE); + if (ff_alloc_extradata(st->codec, FLAC_STREAMINFO_SIZE) < 0) + return AVERROR(ENOMEM); memcpy(st->codec->extradata, streaminfo_start, st->codec->extradata_size); avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); |