[xiph-commits] r3542 - libfishsound/branches/0.9.1/src/libfishsound

conrad at svn.annodex.net conrad at svn.annodex.net
Sun Apr 6 13:52:41 PDT 2008


Author: conrad
Date: 2008-04-06 13:52:41 -0700 (Sun, 06 Apr 2008)
New Revision: 3542

Modified:
   libfishsound/branches/0.9.1/src/libfishsound/speex.c
Log:
merge r3535 from branches/1.0-stable: Fix bounds checking of mode in Speex
header (backported from speexdec) 


Modified: libfishsound/branches/0.9.1/src/libfishsound/speex.c
===================================================================
--- libfishsound/branches/0.9.1/src/libfishsound/speex.c	2008-04-06 20:51:23 UTC (rev 3541)
+++ libfishsound/branches/0.9.1/src/libfishsound/speex.c	2008-04-06 20:52:41 UTC (rev 3542)
@@ -136,7 +136,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