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

vorbis: really fix out-of-bound read

Also fix format string.
parent f25e44e5
...@@ -362,9 +362,9 @@ static int ProcessHeaders( decoder_t *p_dec ) ...@@ -362,9 +362,9 @@ static int ProcessHeaders( decoder_t *p_dec )
p_dec->fmt_out.audio.i_rate = p_sys->vi.rate; p_dec->fmt_out.audio.i_rate = p_sys->vi.rate;
p_dec->fmt_out.audio.i_channels = p_sys->vi.channels; p_dec->fmt_out.audio.i_channels = p_sys->vi.channels;
if( p_dec->fmt_out.audio.i_channels > ARRAY_SIZE(pi_channels_maps) ) if( p_dec->fmt_out.audio.i_channels >= ARRAY_SIZE(pi_channels_maps) )
{ {
msg_Err( p_dec, "invalid number of channels (not between 1 and %lu): %i", msg_Err( p_dec, "invalid number of channels (1-%zu): %i",
ARRAY_SIZE(pi_channels_maps), ARRAY_SIZE(pi_channels_maps),
p_dec->fmt_out.audio.i_channels ); p_dec->fmt_out.audio.i_channels );
return VLC_EGENERIC; return VLC_EGENERIC;
......
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