[vlc-commits] vorbis: really fix out-of-bound read
Rémi Denis-Courmont
git at videolan.org
Thu Apr 24 20:00:21 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr 24 20:59:46 2014 +0300| [b54f2c636cc97f73007d6f574243cc43b7e2f0f8] | committer: Rémi Denis-Courmont
vorbis: really fix out-of-bound read
Also fix format string.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b54f2c636cc97f73007d6f574243cc43b7e2f0f8
---
modules/codec/vorbis.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index 4d0b57c..4550563 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -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_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),
p_dec->fmt_out.audio.i_channels );
return VLC_EGENERIC;
More information about the vlc-commits
mailing list