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

Commit 7e603111 authored by Andreas Huber's avatar Andreas Huber
Browse files

Fixes Treble marshaling of strings embedded in structures from Java

Bug: 35038064
Test: hidl_test_java
Change-Id: Ibfdeae06fdf3982d226a7fa87d4c23feeb8e766e
parent ff1d8da5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -382,7 +382,7 @@ static void JHwBlob_native_putString(
    s = nullptr;

    hidl_string tmp;
    tmp.setToExternal(static_cast<const char *>(subBlob->data()), size);
    tmp.setToExternal(static_cast<const char *>(subBlob->data()), size - 1);

    sp<JHwBlob> blob = JHwBlob::GetNativeContext(env, thiz);
    blob->write(offset, &tmp, sizeof(tmp));