[vlc-commits] wav: reject large PCM specs (fixes #17986)

Rémi Denis-Courmont git at videolan.org
Tue Feb 7 21:46:39 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb  7 22:45:42 2017 +0200| [252a25d022b56cc67e04697901747efe3e058541] | committer: Rémi Denis-Courmont

wav: reject large PCM specs (fixes #17986)

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

 modules/demux/wav.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/demux/wav.c b/modules/demux/wav.c
index 4080bae..de87cb8 100644
--- a/modules/demux/wav.c
+++ b/modules/demux/wav.c
@@ -551,6 +551,11 @@ static int FrameInfo_PCM( unsigned int *pi_size, int *pi_samples,
 {
     int i_bytes;
 
+    if( p_fmt->audio.i_rate > 352800
+     || p_fmt->audio.i_bitspersample > 64
+     || p_fmt->audio.i_channels > AOUT_CHAN_MAX )
+        return VLC_EGENERIC;
+
     /* read samples for 50ms of */
     *pi_samples = __MAX( p_fmt->audio.i_rate / 20, 1 );
 



More information about the vlc-commits mailing list