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

Commit 26ac3132 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Adding extra checks to bound linear block sizes" into main am: 3698d67d

parents b6395777 3698d67d
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) {