CELT_SET_END_BAND_REQUEST in the decoder was performing the wrong bounds check and...
authorGregory Maxwell <greg@xiph.org>
Wed, 9 Feb 2011 03:32:56 +0000 (22:32 -0500)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Wed, 9 Feb 2011 03:35:29 +0000 (22:35 -0500)
libcelt/celt.c

index d29880a..9641075 100644 (file)
@@ -2589,7 +2589,7 @@ int celt_decoder_ctl(CELTDecoder * restrict st, int request, ...)
       case CELT_SET_END_BAND_REQUEST:
       {
          celt_int32 value = va_arg(ap, celt_int32);
-         if (value<0 || value>=st->mode->nbEBands)
+         if (value<1 || value>st->mode->nbEBands)
             goto bad_arg;
          st->end = value;
       }