[vlc-commits] codec: flac: fix potential OOB dereference
Francois Cartegnie
git at videolan.org
Wed Mar 1 13:38:22 CET 2017
vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Mar 1 13:30:47 2017 +0100| [9f97b385e8aa8e92500d797cc87c1552e253418e] | committer: Francois Cartegnie
codec: flac: fix potential OOB dereference
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=9f97b385e8aa8e92500d797cc87c1552e253418e
---
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 32ae7fb..87c1e6c 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -235,9 +235,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