Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Snippets Groups Projects
Commit e69aac87 authored by Ray Essick's avatar Ray Essick
Browse files

Rephrase to avoid integer overflow

Bug: 179046129
Test: atest sf_foundation_test w/local additions
Change-Id: Ie86897fb6283b22745d2fc0cb9b9ea22736193a0
(cherry picked from commit 522b7979)
parent 515608f3
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ ABuffer::~ABuffer() { ...@@ -67,7 +67,7 @@ ABuffer::~ABuffer() {
void ABuffer::setRange(size_t offset, size_t size) { void ABuffer::setRange(size_t offset, size_t size) {
CHECK_LE(offset, mCapacity); CHECK_LE(offset, mCapacity);
CHECK_LE(offset + size, mCapacity); CHECK_LE(size, mCapacity - offset);
mRangeOffset = offset; mRangeOffset = offset;
mRangeLength = size; mRangeLength = size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment