[xiph-commits] r12848 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Tue Apr 10 17:02:07 PDT 2007


Author: jm
Date: 2007-04-10 17:02:05 -0700 (Tue, 10 Apr 2007)
New Revision: 12848

Modified:
   trunk/speex/libspeex/modes.c
Log:
Coverity found that minor bug (crash on invalid programmer input).


Modified: trunk/speex/libspeex/modes.c
===================================================================
--- trunk/speex/libspeex/modes.c	2007-04-11 00:01:44 UTC (rev 12847)
+++ trunk/speex/libspeex/modes.c	2007-04-11 00:02:05 UTC (rev 12848)
@@ -662,7 +662,7 @@
   if (mode == SPEEX_MODEID_NB_48K) return &speex_nb_48k_mode;
 #endif
 
-  if (mode < 0 || mode > SPEEX_NB_MODES) return NULL;
+  if (mode < 0 || mode >= SPEEX_NB_MODES) return NULL;
 
   return speex_mode_list[mode];
 }



More information about the commits mailing list