Commit d375796c authored by Dennis van Amerongen's avatar Dennis van Amerongen

* modules/demux/ogg.c: backport [25189] compare right amount of data (more strict) in ogg demux

parent 337af60f
......@@ -277,14 +277,14 @@ static int Demux( demux_t * p_demux )
{
if( p_stream->fmt.i_codec == VLC_FOURCC('t','h','e','o') &&
oggpacket.bytes >= 7 &&
! memcmp( oggpacket.packet, "\x80theora", 6 ) )
! memcmp( oggpacket.packet, "\x80theora", 7 ) )
{
Ogg_ReadTheoraHeader( p_stream, &oggpacket );
p_stream->secondary_header_packets = 0;
}
else if( p_stream->fmt.i_codec == VLC_FOURCC('v','o','r','b') &&
oggpacket.bytes >= 7 &&
! memcmp( oggpacket.packet, "\x01vorbis", 6 ) )
! memcmp( oggpacket.packet, "\x01vorbis", 7 ) )
{
Ogg_ReadVorbisHeader( p_stream, &oggpacket );
p_stream->secondary_header_packets = 0;
......@@ -770,13 +770,13 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
/* Check for Vorbis header */
if( oggpacket.bytes >= 7 &&
! memcmp( oggpacket.packet, "\x01vorbis", 6 ) )
! memcmp( oggpacket.packet, "\x01vorbis", 7 ) )
{
Ogg_ReadVorbisHeader( p_stream, &oggpacket );
msg_Dbg( p_demux, "found vorbis header" );
}
/* Check for Speex header */
else if( oggpacket.bytes >= 7 &&
else if( oggpacket.bytes >= 5 &&
! memcmp( oggpacket.packet, "Speex", 5 ) )
{
Ogg_ReadSpeexHeader( p_stream, &oggpacket );
......@@ -820,7 +820,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
}
/* Check for Theora header */
else if( oggpacket.bytes >= 7 &&
! memcmp( oggpacket.packet, "\x80theora", 6 ) )
! memcmp( oggpacket.packet, "\x80theora", 7 ) )
{
Ogg_ReadTheoraHeader( p_stream, &oggpacket );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment