git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c117da9
)
vorbis_parser: Move vp check to avoid a null pointer dereference
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 24 Nov 2014 15:48:27 +0000
(15:48 +0000)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Tue, 25 Nov 2014 02:00:06 +0000
(
02:00
+0000)
CC: libav-stable@libav.org
Bug-Id: CID
1251347
libavcodec/vorbis_parser.c
patch
|
blob
|
history
diff --git
a/libavcodec/vorbis_parser.c
b/libavcodec/vorbis_parser.c
index
231706c
..
054635d
100644
(file)
--- 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;