mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
avformat/oggparsespeex: Check for extradata allocation failure
Fixes CID1108574 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
2c1e075308
commit
eb5cc8febc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user