Browse Source

avcodec/vorbis_parser: Move vp check

Fixes null pointer dereference
Fixes CID1251347

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.5
Michael Niedermayer 11 years ago
parent
commit
374c907fb3
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/vorbis_parser.c

+ 2
- 2
libavcodec/vorbis_parser.c View File

@@ -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;


Loading…
Cancel
Save