1275 byte packets is the absolute maximum packet size we're going to support. This...
authorGregory Maxwell <greg@xiph.org>
Fri, 4 Feb 2011 04:26:38 +0000 (23:26 -0500)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Fri, 4 Feb 2011 04:57:30 +0000 (23:57 -0500)
libcelt/celt.c

index f0a25e7..9d812ed 100644 (file)
@@ -919,7 +919,7 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i
    int silence=0;
    SAVE_STACK;
 
-   if (nbCompressedBytes<2 || pcm==NULL)
+   if (nbCompressedBytes<2 || nbCompressedBytes>1275 || pcm==NULL)
      return CELT_BAD_ARG;
 
    frame_size *= st->upsample;
@@ -2180,7 +2180,7 @@ int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *da
 
    SAVE_STACK;
 
-   if (pcm==NULL)
+   if (len<0 || len>1275 || pcm==NULL)
       return CELT_BAD_ARG;
 
    frame_size *= st->downsample;