diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-24 15:48:27 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-25 02:00:06 +0000 |
commit | 62e52b94e684491dfc5a6b7ca688bb86f7cd0f3f (patch) | |
tree | 28f72580f04cd2fad060d7e25d7ef26da5af04ff /libavcodec | |
parent | c117da9d3e0db7dc311d817054988364b3ef4587 (diff) | |
download | ffmpeg-streaming-62e52b94e684491dfc5a6b7ca688bb86f7cd0f3f.zip ffmpeg-streaming-62e52b94e684491dfc5a6b7ca688bb86f7cd0f3f.tar.gz |
vorbis_parser: Move vp check to avoid a null pointer dereference
CC: libav-stable@libav.org
Bug-Id: CID 1251347
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vorbis_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vorbis_parser.c b/libavcodec/vorbis_parser.c index 231706c..054635d 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; |