[vlc-commits] Wav: Reject invalid files leading to FPE

Jean-Baptiste Kempf git at videolan.org
Sun Oct 13 00:10:50 CEST 2013


vlc/vlc-2.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Oct 13 00:09:50 2013 +0200| [8c9206a763a0207d5bc838753f0e3d4b9748f539] | committer: Jean-Baptiste Kempf

Wav: Reject invalid files leading to FPE

(cherry picked from commit ee24078f6ca8b7df8f14a83977f588a6e00d8f2b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/demux/wav.c b/modules/demux/wav.c
index 03364b9..258ba7a 100644
--- a/modules/demux/wav.c
+++ b/modules/demux/wav.c
@@ -349,6 +349,10 @@ static int Open( vlc_object_t * p_this )
         p_sys->fmt.i_codec =
             vlc_fourcc_GetCodecAudio( p_sys->fmt.i_codec,
                                       p_sys->fmt.audio.i_bitspersample );
+        if( p_sys->fmt.i_codec == 0 ) {
+            msg_Err( p_demux, "Unrecognized codec" );
+            goto error;
+        }
         break;
     case VLC_CODEC_ADPCM_MS:
     /* FIXME not sure at all FIXME */



More information about the vlc-commits mailing list