ref: 2ce30358ecb646720f8612bef64ed73d4a6d64ca
parent: 3d09c5cb35ac3a3050179dbf9c202521d6a51525
author: Timothy B. Terriberry <[email protected]>
date: Mon Nov 18 15:02:08 EST 2013
Unpad asserts Signed-off-by: Jean-Marc Valin <[email protected]>
--- a/src/repacketizer.c
+++ b/src/repacketizer.c
@@ -208,6 +208,7 @@
{
/* Using OPUS_MOVE() instead of OPUS_COPY() in case we're doing in-place
padding from opus_packet_pad or opus_packet_unpad(). */
+ celt_assert(frames[i] + len[i] <= data || ptr <= frames[i]);
OPUS_MOVE(ptr, frames[i], len[i]);
ptr += len[i];
}
@@ -261,7 +262,7 @@
if (ret < 0)
return ret;
ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, data, len, 0, 0);
- celt_assert(ret > 0);
+ celt_assert(ret > 0 && ret <= len);
return ret;
}