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

Commit 6db9e07a authored by Steven Moreland's avatar Steven Moreland
Browse files

binder_parcel_fuzzer: remove embedded handle

Failures due to the way these are called here. b/185949367 is tracking
more coverage.

Fixes: 189348684
Test: binder_parcel_fuzzer
Change-Id: Ic22b942df003e02c26c2b4b5bd389dccc16bb75d
parent 7f26fabe
Loading
Loading
Loading
Loading
+0 −31
Original line number Diff line number Diff line
@@ -148,28 +148,6 @@ std::vector<ParcelRead<::android::hardware::Parcel>> HWBINDER_PARCEL_READ_FUNCTI
        // should be null since we don't create any IPC objects
        CHECK(data == nullptr) << data;
    },
    [] (const ::android::hardware::Parcel& p, uint8_t size) {
        FUZZ_LOG() << "about to readEmbeddedNativeHandle";
        size_t parent_buffer_handle = size & 0xf;
        size_t parent_offset = size >> 4;
        const native_handle_t* handle = nullptr;
        status_t status = p.readEmbeddedNativeHandle(parent_buffer_handle, parent_offset, &handle);
        FUZZ_LOG() << "readEmbeddedNativeHandle status: " << status << " handle: " << handle << " handle: " << handle;

        // should be null since we don't create any IPC objects
        CHECK(handle == nullptr) << handle;
    },
    [] (const ::android::hardware::Parcel& p, uint8_t size) {
        FUZZ_LOG() << "about to readNullableEmbeddedNativeHandle";
        size_t parent_buffer_handle = size & 0xf;
        size_t parent_offset = size >> 4;
        const native_handle_t* handle = nullptr;
        status_t status = p.readNullableEmbeddedNativeHandle(parent_buffer_handle, parent_offset, &handle);
        FUZZ_LOG() << "readNullableEmbeddedNativeHandle status: " << status << " handle: " << handle << " handle: " << handle;

        // should be null since we don't create any IPC objects
        CHECK(handle == nullptr) << handle;
    },
    [] (const ::android::hardware::Parcel& p, uint8_t /*data*/) {
        FUZZ_LOG() << "about to readNativeHandleNoDup";
        const native_handle_t* handle = nullptr;
@@ -180,14 +158,5 @@ std::vector<ParcelRead<::android::hardware::Parcel>> HWBINDER_PARCEL_READ_FUNCTI
        CHECK(handle == nullptr) << handle;
        CHECK(status != ::android::OK);
    },
    [] (const ::android::hardware::Parcel& p, uint8_t /*data*/) {
        FUZZ_LOG() << "about to readNullableNativeHandleNoDup";
        const native_handle_t* handle = nullptr;
        status_t status = p.readNullableNativeHandleNoDup(&handle);
        FUZZ_LOG() << "readNullableNativeHandleNoDup status: " << status << " handle: " << handle;

        // should be null since we don't create any IPC objects
        CHECK(handle == nullptr) << handle;
    },
};
// clang-format on