Commit eb5cc8fe authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/oggparsespeex: Check for extradata allocation failure

Fixes CID1108574
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2c1e0753
......@@ -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);
......
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