Merge "Fixes Treble marshaling of strings embedded in structures from Java"

This commit is contained in:
Treehugger Robot
2017-02-06 23:41:27 +00:00
committed by Gerrit Code Review

View File

@ -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));