diff options
author | Gregory Maxwell <greg@xiph.org> | 2011-02-04 07:26:38 +0300 |
---|---|---|
committer | Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> | 2011-02-04 07:57:30 +0300 |
commit | 4d3e105a6c1d144760ddeb3c1951fa838b935747 (patch) | |
tree | 41cc78cc860d50a6d001c1d8d46fff489a0a9c3a /libcelt | |
parent | 8430a75b2f9b69b8c0cb5027274e76cf40f91355 (diff) |
1275 byte packets is the absolute maximum packet size we're going to support. This makes the encoder and decoder refuse to operate outside of these boundaries.
Diffstat (limited to 'libcelt')
-rw-r--r-- | libcelt/celt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcelt/celt.c b/libcelt/celt.c index f0a25e7..9d812ed 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -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; |