Merge "Fixes Treble marshaling of strings embedded in structures from Java" am: 97fca8c035

am: 0bae9b1406

Change-Id: I0eb29e3e80243a958aa2520924ea9ad859034cdf
This commit is contained in:
Andreas Huber
2017-02-07 00:12:13 +00:00
committed by android-build-merger

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