Commit 5585f98e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix gcc4 warnings (refs #258)

NOTE to developers :
When you want to compare n bytes from two buffers, please use :
  memcmp( buf1, buf2, n )
rather than :
  strncmp( buf1, buf2, n )

strncmp should only be used if either of the buffers might be
nul-terminated within its first n bytes.
parent 1090a5b5
......@@ -85,14 +85,14 @@ static int Open( vlc_object_t * p_this )
/* Check if we are dealing with a WAV file */
if( stream_Peek( p_demux->s, &p_peek, 12 ) == 12 &&
!strncmp( p_peek, "RIFF", 4 ) && !strncmp( &p_peek[8], "WAVE", 4 ) )
!memcmp( p_peek, "RIFF", 4 ) && !memcmp( p_peek + 8, "WAVE", 4 ) )
{
int i_size;
/* Skip the wave header */
i_peek = 12 + 8;
while( stream_Peek( p_demux->s, &p_peek, i_peek ) == i_peek &&
strncmp( p_peek + i_peek - 8, "data", 4 ) )
memcmp( p_peek + i_peek - 8, "data", 4 ) )
{
i_peek += GetDWLE( p_peek + i_peek - 4 ) + 8;
}
......
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