1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

vorbis_parser: Move vp check to avoid a null pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 1251347
This commit is contained in:
Michael Niedermayer 2014-11-24 15:48:27 +00:00 committed by Vittorio Giovara
parent c117da9d3e
commit 62e52b94e6

View File

@ -303,9 +303,9 @@ static int vorbis_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
if (!s->vp && avctx->extradata && avctx->extradata_size) {
s->vp = av_vorbis_parse_init(avctx->extradata, avctx->extradata_size);
if (!s->vp)
goto end;
}
if (!s->vp)
goto end;
if ((duration = av_vorbis_parse_frame(s->vp, buf, buf_size)) >= 0)
s1->duration = duration;