[xiph-commits] r3536 - libfishsound/trunk/src/libfishsound

conrad at svn.annodex.net conrad at svn.annodex.net
Sat Apr 5 23:18:28 PDT 2008


Author: conrad
Date: 2008-04-05 23:18:27 -0700 (Sat, 05 Apr 2008)
New Revision: 3536

Modified:
   libfishsound/trunk/src/libfishsound/speex.c
Log:
Fix exploitable condition in Speex mode checking.
Ported from branches/1.0-stable r3535


Modified: libfishsound/trunk/src/libfishsound/speex.c
===================================================================
--- libfishsound/trunk/src/libfishsound/speex.c	2008-04-06 05:22:19 UTC (rev 3535)
+++ libfishsound/trunk/src/libfishsound/speex.c	2008-04-06 06:18:27 UTC (rev 3536)
@@ -178,7 +178,7 @@
     return NULL;
   }
 
-  if (header->mode >= SPEEX_NB_MODES) {
+  if (header->mode >= SPEEX_NB_MODES || header->mode < 0) {
     /*
     info_dialog_new ("Speex error", NULL,
 		     "Mode number %d does not (any longer) exist in this version\n",



More information about the commits mailing list