OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f13fe60
)
ogg: Always alloc the private context in vorbis_header
author
Luca Barbato
<lu_zero@gentoo.org>
Tue, 13 Aug 2013 05:28:41 +0000
(07:28 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Tue, 13 Aug 2013 12:04:55 +0000
(14:04 +0200)
It is possible to have an initial broken header and then valid packets.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
libavformat/oggparsevorbis.c
patch
|
blob
|
history
diff --git
a/libavformat/oggparsevorbis.c
b/libavformat/oggparsevorbis.c
index
db462fc
..
adf8f03
100644
(file)
--- a/
libavformat/oggparsevorbis.c
+++ b/
libavformat/oggparsevorbis.c
@@
-212,15
+212,15
@@
vorbis_header (AVFormatContext * s, int idx)
struct oggvorbis_private *priv;
int pkt_type = os->buf[os->pstart];
- if (!(pkt_type & 1))
- return 0;
-
if (!os->private) {
os->private = av_mallocz(sizeof(struct oggvorbis_private));
if (!os->private)
return 0;
}
+ if (!(pkt_type & 1))
+ return 0;
+
if (os->psize < 1 || pkt_type > 5)
return -1;