[vlc-commits] demux: ogg: don't use incomplete vorbis headers (fix #12270)

Francois Cartegnie git at videolan.org
Tue Sep 23 16:35:31 CEST 2014


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Sep 23 14:58:29 2014 +0200| [05d94c9ed05235c2bc1b54029cb98d317fa7fdae] | committer: Jean-Baptiste Kempf

demux: ogg: don't use incomplete vorbis headers (fix #12270)

(cherry picked from commit 35133fe70b28dc91b38a650ee9398cf68d8f119d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=05d94c9ed05235c2bc1b54029cb98d317fa7fdae
---

 modules/demux/ogg.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 7e41e76..5d30cee 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -509,6 +509,11 @@ static int Demux( demux_t * p_demux )
 #ifdef HAVE_LIBVORBIS
                 case VLC_CODEC_VORBIS:
                 {
+                    if( p_stream->special.vorbis.b_invalid )
+                    {
+                        msg_Err( p_demux, "missing vorbis headers, can't compute block size" );
+                        break;
+                    }
                     long i_blocksize = vorbis_packet_blocksize(
                                 p_stream->special.vorbis.p_info, &dumb_packet );
                     if ( i_prev_blocksize )



More information about the vlc-commits mailing list