[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
Wed Nov 3 20:22:17 CET 2010


vlc/vlc-1.1 | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Nov  2 21:07:48 2010 +0100| [bffe7a908676ec37147ae315db63e164f7ab7cdd] | committer: Rémi Duraffort 

Fixed potential division by 0 with corrupted real file and VLC_CODEC_RA_288.
(cherry picked from commit b62d7ff5873bfcd2533888001642c6a0059b03dc)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

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

 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 7ae46ad..dee5b52 100644
--- a/modules/demux/real.c
+++ b/modules/demux/real.c
@@ -1537,6 +1537,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