Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-20 18:55:43 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-10-20 18:55:43 +0400
commit2c1e075308e14810149f53be87959a62cb83a730 (patch)
treef11990fd055e7da0e95b8d5c5225cde896a09bb1 /libavformat
parentb294a4beec24d07903c4aefb8ca26cc154fdd5ac (diff)
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c
index 894b43850c..f69533f6c1 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);