[vlc-commits] dmo: fix potential out-of-bound read

Rémi Denis-Courmont git at videolan.org
Tue May 15 18:47:38 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar  6 18:10:51 2012 +0200| [b31373c27efb007d1ac3f7138932133f785936df] | committer: Rémi Denis-Courmont

dmo: fix potential out-of-bound read

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b31373c27efb007d1ac3f7138932133f785936df
---

 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 eee30a1ed8..d51961ce4e 100644
--- a/modules/codec/dmo/dmo.c
+++ b/modules/codec/dmo/dmo.c
@@ -458,6 +458,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