[vlc-devel] commit: Fix for [oCERT-2008-004] multiple speex implementations insufficient boundary checks. Patch by Eren Türkay ( Pavlov Konstantin )

git version control git at videolan.org
Thu Apr 17 20:47:36 CEST 2008


vlc | branch: 0.8.6-bugfix | Pavlov Konstantin <thresh at videolan.org> | Thu Apr 17 22:47:13 2008 +0400| [c1c81073e661f7d80197711ab11753e1e170b44c]

Fix for [oCERT-2008-004] multiple speex implementations insufficient boundary checks. Patch by Eren Türkay
(cherry picked from commit 8060b3457e20e6223b70927693f8da8f547b8fef)

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

 modules/codec/speex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/codec/speex.c b/modules/codec/speex.c
index 480bbc0..0ca290f 100644
--- a/modules/codec/speex.c
+++ b/modules/codec/speex.c
@@ -332,7 +332,7 @@ static int ProcessInitialHeader( decoder_t *p_dec, ogg_packet *p_oggpacket )
         msg_Err( p_dec, "cannot read Speex header" );
         return VLC_EGENERIC;
     }
-    if( p_header->mode >= SPEEX_NB_MODES )
+    if( p_header->mode >= SPEEX_NB_MODES || p_header->mode < 0 )
     {
         msg_Err( p_dec, "mode number %d does not (yet/any longer) exist in "
                  "this version of libspeex.", p_header->mode );




More information about the vlc-devel mailing list