Fix oec session id in dynamic adpater

[ Merge of http://go/wvgerrit/174572 ]

Pass the real oemcrypto session id from `pair.session` instead of
`session` for CopyBuffer, since `session` can be changed when L1
and L3 are running in parallel and `session` in that case may not
be the correct oemcrypto session id any more.

Bug: 279967915
Test: wvts
Change-Id: Ic5e21ccb227d4c4992ef500435fa3b68812c4d9b
This commit is contained in:
Rahul Frias
2023-05-08 23:21:47 -07:00
parent 24c3bbb783
commit 09d7572ece

View File

@@ -2303,7 +2303,7 @@ extern "C" OEMCryptoResult OEMCrypto_CopyBuffer(
LevelSession pair = gAdapter->GetSession(session);
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
if (pair.fcn->CopyBuffer == nullptr) return OEMCrypto_ERROR_NOT_IMPLEMENTED;
return pair.fcn->CopyBuffer(session, data_addr, data_length,
return pair.fcn->CopyBuffer(pair.session, data_addr, data_length,
out_buffer_descriptor, subsample_flags);
}