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

Commit c016e0f8 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Fix potential memory corruption in NuCachedSource2."

parents 0c19aaae 13aa6c2d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -450,6 +450,11 @@ ssize_t NuCachedSource2::readInternal(off64_t offset, void *data, size_t size) {
        }

        size_t avail = mCache->totalSize() - delta;

        if (avail > size) {
            avail = size;
        }

        mCache->copy(delta, data, avail);

        return avail;