[vlc-commits] dmo: fix potential out-of-bound read
Rémi Denis-Courmont
git at videolan.org
Wed May 16 18:56:20 CEST 2018
vlc/vlc-3.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 6 18:10:51 2012 +0200| [b8ffcf950a4423a512293f1e72c9b21dd5f83f35] | committer: Jean-Baptiste Kempf
dmo: fix potential out-of-bound read
(cherry picked from commit b31373c27efb007d1ac3f7138932133f785936df)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=b8ffcf950a4423a512293f1e72c9b21dd5f83f35
---
modules/codec/dmo/dmo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c
index 790617e74b..ba59c613ba 100644
--- a/modules/codec/dmo/dmo.c
+++ b/modules/codec/dmo/dmo.c
@@ -457,6 +457,8 @@ static int DecOpen( decoder_t *p_dec )
p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate;
p_dec->fmt_out.audio.i_channels = p_dec->fmt_in.audio.i_channels;
p_dec->fmt_out.audio.i_bitspersample = 16;//p_dec->fmt_in.audio.i_bitspersample; We request 16
+ if( p_dec->fmt_in.audio.i_channels > 8 )
+ goto error;
p_dec->fmt_out.audio.i_physical_channels =
pi_channels_maps[p_dec->fmt_out.audio.i_channels];
More information about the vlc-commits
mailing list