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

Commit 7aa7f841 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Android Git Automerger
Browse files

am dc77ec59: am 3bb5fdc7: Merge "Check that bitmap\'s size does not exceed 32...

am dc77ec59: am 3bb5fdc7: Merge "Check that bitmap\'s size does not exceed 32 bits. DO NOT MERGE" into lmp-mr1-dev

* commit 'dc77ec59':
  Check that bitmap's size does not exceed 32 bits. DO NOT MERGE
parents f9259107 dc77ec59
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -536,7 +536,12 @@ jbyteArray GraphicsJNI::allocateJavaPixelRef(JNIEnv* env, SkBitmap* bitmap,
        return NULL;
    }

    const size_t size = bitmap->getSize();
    const int64_t size64 = bitmap->computeSize64();
    if (!sk_64_isS32(size64)) {
        doThrowIAE(env, "bitmap size exceeds 32 bits");
        return NULL;
    }
    const size_t size = sk_64_asS32(size64);
    jbyteArray arrayObj = (jbyteArray) env->CallObjectMethod(gVMRuntime,
                                                             gVMRuntime_newNonMovableArray,
                                                             gByte_class, size);