OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d7b5f0
)
oggparsevorbis: Add some sanity checks to header packet ordering/presence.
author
Alex Converse
<alex.converse@gmail.com>
Sat, 7 Aug 2010 21:30:34 +0000
(21:30 +0000)
committer
Alex Converse
<alex.converse@gmail.com>
Sat, 7 Aug 2010 21:30:34 +0000
(21:30 +0000)
Originally committed as revision 24740 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/oggparsevorbis.c
patch
|
blob
|
history
diff --git
a/libavformat/oggparsevorbis.c
b/libavformat/oggparsevorbis.c
index
886ef52
..
c7f8149
100644
(file)
--- a/
libavformat/oggparsevorbis.c
+++ b/
libavformat/oggparsevorbis.c
@@
-206,6
+206,12
@@
vorbis_header (AVFormatContext * s, int idx)
return -1;
priv = os->private;
+
+ if (priv->packet[pkt_type>>1])
+ return -1;
+ if (pkt_type > 1 && !priv->packet[0] || pkt_type > 3 && !priv->packet[1])
+ return -1;
+
priv->len[pkt_type >> 1] = os->psize;
priv->packet[pkt_type >> 1] = av_mallocz(os->psize);
memcpy(priv->packet[pkt_type >> 1], os->buf + os->pstart, os->psize);