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

Commit 3698d67d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Adding extra checks to bound linear block sizes" into main

parents b632fda9 2aef16f9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2895,6 +2895,10 @@ static void extractBufferFromContext(
        jint offset,
        jint size,
        std::shared_ptr<C2Buffer> *buffer) {
    if ((offset + size) > context->capacity()) {
        ALOGW("extractBufferFromContext: offset + size provided exceed capacity");
        return;
    }
    *buffer = context->toC2Buffer(offset, size);
    if (*buffer == nullptr) {
        if (!context->mMemory) {