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

Commit c4a5f5ec authored by Pawin Vongmasa's avatar Pawin Vongmasa Committed by Steven Moreland
Browse files

Zero-initialize HIDL structs before passing

Test: cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice
(only existing failures/flakes)
Bug: 131267328
Bug: 131356202
Change-Id: I91e6e0c692d470f4d3a713068545cedf5ae925a7
Merged-In: I91e6e0c692d470f4d3a713068545cedf5ae925a7
parent bcf5e238
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1049,7 +1049,7 @@ status_t H2BGraphicBufferProducer::detachNextBuffer(

status_t H2BGraphicBufferProducer::attachBuffer(
        int* outSlot, const sp<GraphicBuffer>& buffer) {
    AnwBuffer tBuffer;
    AnwBuffer tBuffer{};
    wrapAs(&tBuffer, *buffer);
    status_t fnStatus;
    status_t transStatus = toStatusT(mBase->attachBuffer(tBuffer,
@@ -1064,7 +1064,7 @@ status_t H2BGraphicBufferProducer::queueBuffer(
        int slot,
        const QueueBufferInput& input,
        QueueBufferOutput* output) {
    HGraphicBufferProducer::QueueBufferInput tInput;
    HGraphicBufferProducer::QueueBufferInput tInput{};
    native_handle_t* nh;
    if (!wrapAs(&tInput, &nh, input)) {
        ALOGE("H2BGraphicBufferProducer::queueBuffer - "