Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy B. Terriberry <tterribe@xiph.org>2013-11-19 05:02:08 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2013-11-19 05:02:08 +0400
commit2ce30358ecb646720f8612bef64ed73d4a6d64ca (patch)
tree5d471de01bfe65fbf77cd19c892e0b33b60d46f2 /src/repacketizer.c
parent3d09c5cb35ac3a3050179dbf9c202521d6a51525 (diff)
Unpad asserts
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Diffstat (limited to 'src/repacketizer.c')
-rw-r--r--src/repacketizer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/repacketizer.c b/src/repacketizer.c
index 7d0c59c5..feb9480c 100644
--- a/src/repacketizer.c
+++ b/src/repacketizer.c
@@ -208,6 +208,7 @@ opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int
{
/* 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 @@ opus_int32 opus_packet_unpad(unsigned char *data, opus_int32 len)
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;
}