diff options
author | Andreas Öman <andreas@lonelycoder.com> | 2007-11-04 19:52:08 +0000 |
---|---|---|
committer | Andreas Öman <andreas@lonelycoder.com> | 2007-11-04 19:52:08 +0000 |
commit | 5b5bd7c9ee692026e67126e3e9f1883fc7701319 (patch) | |
tree | 3f4272188a8bdd4c2948fb38e83a81f5d0d4c284 | |
parent | f9def9ccc6ecfe1778d4daa62a7ada27b5f79bfc (diff) | |
download | ffmpeg-5b5bd7c9ee692026e67126e3e9f1883fc7701319.tar.gz |
make sure the mpeg audio header is valid before passing it to ff_mpegaudio_decode_header()
Originally committed as revision 10925 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/mp3.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c index 9a0b020f2f..18691ff67b 100644 --- a/libavformat/mp3.c +++ b/libavformat/mp3.c @@ -435,7 +435,11 @@ static void mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, offset_t base) const offset_t xing_offtbl[2][2] = {{32, 17}, {17,9}}; MPADecodeContext c; - ff_mpegaudio_decode_header(&c, get_be32(&s->pb)); + v = get_be32(&s->pb); + if(ff_mpa_check_header(v) < 0) + return; + + ff_mpegaudio_decode_header(&c, v); if(c.layer != 3) return; |