Update L3 after key double free fix tm-widevine-release

Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/164981

Original commit message:
Fix key double free issue in L3

Cherry-pick the fix from:
https://widevine-internal-review.googlesource.com/c/cdm/+/164885/
https://widevine-internal-review.googlesource.com/c/cdm/+/164958/

Then generated L3 on top of tm-widevine-release code base.

Original commit message:

During license loading if an error occurs, all the loaded keys will be
freed. Later at session termination, the previously freed keys get freed
again, which screwed up the key table.

This CL prevents the double free by checking if the key index is already
freed, and updates the freed index to be kKeyDataArrayCount.

Also a side fix to correctly zero-out the intialized memory and adding a
few debug outs.

Test: ran L3 unit tests
Test: verified GTS tests on arm32 device
Bug: 252434586
Change-Id: I8058c10daae3d1007733eb6ac54101545d3ce029
This commit is contained in:
Cong Lin
2023-01-17 12:40:18 -08:00
parent 25b2ea2be5
commit 79b8a375a6
4 changed files with 294569 additions and 294406 deletions

File diff suppressed because it is too large Load Diff