summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-20 16:57:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-20 16:57:45 +0200
commiteb5cc8febc6cd7938f8fdce95d78cacdbe1be30b (patch)
tree5efeccadbea0227896d703a3d55dee528f40b958 /libavformat
parent2c1e075308e14810149f53be87959a62cb83a730 (diff)
downloadffmpeg-streaming-eb5cc8febc6cd7938f8fdce95d78cacdbe1be30b.zip
ffmpeg-streaming-eb5cc8febc6cd7938f8fdce95d78cacdbe1be30b.tar.gz
avformat/oggparsespeex: Check for extradata allocation failure
Fixes CID1108574 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/oggparsespeex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c
index 7cbc7e0..1b9de9c 100644
--- a/libavformat/oggparsespeex.c
+++ b/libavformat/oggparsespeex.c
@@ -77,7 +77,8 @@ static int speex_header(AVFormatContext *s, int idx) {
if (frames_per_packet)
spxp->packet_size *= frames_per_packet;
- ff_alloc_extradata(st->codec, os->psize);
+ if (ff_alloc_extradata(st->codec, os->psize) < 0)
+ return AVERROR(ENOMEM);
memcpy(st->codec->extradata, p, st->codec->extradata_size);
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
OpenPOWER on IntegriCloud