[vlc-commits] codec: flac: fix potential oob dereference
Francois Cartegnie
git at videolan.org
Wed Mar 1 17:32:28 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Mar 1 13:27:35 2017 +0100| [7081237e69dd22d644ecf6515344ee96a3019269] | committer: Francois Cartegnie
codec: flac: fix potential oob dereference
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7081237e69dd22d644ecf6515344ee96a3019269
---
modules/codec/flac.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index cc96a53..5394d53 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -243,9 +243,12 @@ static void DecoderMetadataCallback( const FLAC__StreamDecoder *decoder,
/* Setup the format */
p_dec->fmt_out.audio.i_rate = metadata->data.stream_info.sample_rate;
p_dec->fmt_out.audio.i_channels = metadata->data.stream_info.channels;
- p_dec->fmt_out.audio.i_physical_channels =
+ if( metadata->data.stream_info.channels < 9 )
+ {
+ p_dec->fmt_out.audio.i_physical_channels =
p_dec->fmt_out.audio.i_original_channels =
pi_channels_maps[metadata->data.stream_info.channels];
+ }
if (!p_dec->fmt_out.audio.i_bitspersample)
p_dec->fmt_out.audio.i_bitspersample =
metadata->data.stream_info.bits_per_sample;
More information about the vlc-commits
mailing list