summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis_parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-16 18:06:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-16 18:06:03 +0100
commit374c907fb35f8236547b24d792fbb9bed201e321 (patch)
tree022a64cf8d6e623b1bd9d9f5d6b610a8239f490e /libavcodec/vorbis_parser.c
parent1de786777e0fb18ec1e44cea058c77e83980b6c4 (diff)
avcodec/vorbis_parser: Move vp check
Fixes null pointer dereference Fixes CID1251347 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vorbis_parser.c')
-rw-r--r--libavcodec/vorbis_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vorbis_parser.c b/libavcodec/vorbis_parser.c
index 0d72fb1b90..b99f115598 100644
--- a/libavcodec/vorbis_parser.c
+++ b/libavcodec/vorbis_parser.c
@@ -330,9 +330,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;