ref: 4d3e105a6c1d144760ddeb3c1951fa838b935747
parent: 8430a75b2f9b69b8c0cb5027274e76cf40f91355
author: Gregory Maxwell <[email protected]>
date: Thu Feb 3 18:26:38 EST 2011
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.
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -919,7 +919,7 @@
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 @@
SAVE_STACK;
- if (pcm==NULL)
+ if (len<0 || len>1275 || pcm==NULL)
return CELT_BAD_ARG;
frame_size *= st->downsample;