From: Michael Niedermayer Date: Mon, 24 Nov 2014 15:48:27 +0000 (+0000) Subject: vorbis_parser: Move vp check to avoid a null pointer dereference X-Git-Tag: n2.5~28^2~30 X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/62e52b94e684491dfc5a6b7ca688bb86f7cd0f3f vorbis_parser: Move vp check to avoid a null pointer dereference CC: libav-stable@libav.org Bug-Id: CID 1251347 --- diff --git a/libavcodec/vorbis_parser.c b/libavcodec/vorbis_parser.c index 231706c42b..054635d100 100644 --- a/libavcodec/vorbis_parser.c +++ b/libavcodec/vorbis_parser.c @@ -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;