[vlc-commits] commit: Fixed potential division by 0 with corrupted real file and VLC_CODEC_RA_288 . (Laurent Aimar )

git at videolan.org git at videolan.org
Tue Nov 2 21:20:44 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Nov  2 21:07:48 2010 +0100| [b62d7ff5873bfcd2533888001642c6a0059b03dc] | committer: Laurent Aimar 

Fixed potential division by 0 with corrupted real file and VLC_CODEC_RA_288.

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

 modules/demux/real.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/demux/real.c b/modules/demux/real.c
index 720528d..1b7560b 100644
--- a/modules/demux/real.c
+++ b/modules/demux/real.c
@@ -1536,6 +1536,11 @@ static int CodecAudioParse( demux_t *p_demux, int i_tk_id, const uint8_t *p_data
         break;
 
     case VLC_FOURCC('2','8','_','8'):
+        if( i_coded_frame_size <= 0 )
+        {
+            es_format_Clean( &fmt );
+            return VLC_EGENERIC;
+        }
         fmt.i_codec = VLC_CODEC_RA_288;
         fmt.audio.i_blockalign = i_coded_frame_size;
         break;



More information about the vlc-commits mailing list