Fix gts issues.

Fix the conversion from in_args.keyId to Cdm format
which causes nullptr dereference signal 11 faults.

Test: atest
  atest-dev GtsMediaTestCases:com.google.android.media.gts.WidevineGenericOpsTests

Bug: 214410088
Change-Id: If84863e2501d4ccae7b8b38dceb707bb4bfa12fb
This commit is contained in:
Edwin
2022-02-14 10:42:52 -08:00
parent 9654d29be6
commit 93b5514a27

View File

@@ -147,8 +147,7 @@ SharedBufferBase::~SharedBufferBase() {
uint8_t* srcPtr = nullptr;
void* destPtr = nullptr;
// Convert parameters to the form the CDM wishes to consume them in.
const KeyId cryptoKey(reinterpret_cast<const char*>(in_args.keyId.data()),
wvcdm::KEY_ID_SIZE);
const KeyId cryptoKey(in_args.keyId.begin(), in_args.keyId.end());
// start scope for lock_guard
{