Commit 4d3e105a authored by Gregory Maxwell's avatar Gregory Maxwell Committed by Jean-Marc Valin
Browse files

1275 byte packets is the absolute maximum packet size we're going to support....

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.
parent 8430a75b
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment