[vlc-commits] Rawaud: reject suspicious bitrates

Jean-Baptiste Kempf git at videolan.org
Sun Feb 12 14:32:35 CET 2017


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Feb 12 14:26:36 2017 +0100| [f4cfda037ca38befc11d305920a1eff7deaa5a6c] | committer: Jean-Baptiste Kempf

Rawaud: reject suspicious bitrates

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

 modules/demux/rawaud.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/demux/rawaud.c b/modules/demux/rawaud.c
index 527429f..1e6d97d 100644
--- a/modules/demux/rawaud.c
+++ b/modules/demux/rawaud.c
@@ -184,6 +184,14 @@ static int Open( vlc_object_t * p_this )
                            p_sys->fmt.audio.i_channels *
                            p_sys->fmt.audio.i_bitspersample;
 
+    if( p_sys->fmt.i_bitrate > 50000000)
+    {
+        msg_Err( p_demux, "invalid bitrate");
+        es_format_Clean( &p_sys->fmt );
+        free( p_sys );
+        return VLC_EGENERIC;
+    }
+
     msg_Dbg( p_demux,
      "format initialized: channels=%d , samplerate=%d Hz, fourcc=%4.4s, bits per sample = %d, bitrate = %d bit/s",
      p_sys->fmt.audio.i_channels,



More information about the vlc-commits mailing list