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

Commit 6fde033e authored by Ryo Hashimoto's avatar Ryo Hashimoto Committed by android-build-merger
Browse files

Merge "Fix buffer size check in replyRead" into pi-dev

am: cf7b8a14

Change-Id: I10ad7a0798d11d15fba5e358abd38166f48af488
parents b12f236e cf7b8a14
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -166,8 +166,8 @@ void com_android_internal_os_FuseAppLoop_replyWrite(
void com_android_internal_os_FuseAppLoop_replyRead(
        JNIEnv* env, jobject self, jlong ptr, jlong unique, jint size, jbyteArray data) {
    ScopedByteArrayRO array(env, data);
    CHECK(size >= 0);
    CHECK(static_cast<size_t>(size) < array.size());
    CHECK_GE(size, 0);
    CHECK_LE(static_cast<size_t>(size), array.size());
    if (!reinterpret_cast<fuse::FuseAppLoop*>(ptr)->ReplyRead(unique, size, array.get())) {
        reinterpret_cast<fuse::FuseAppLoop*>(ptr)->Break();
    }