Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-04-01 05:12:53 +00:00
committed by Android (Google) Code Review

View File

@@ -2693,6 +2693,7 @@ OEMCryptoResult CryptoSession::DecryptSample(
if (sts == OEMCrypto_ERROR_BUFFER_TOO_LARGE) {
// Fall back to sending each subsample region individually
sts = OEMCrypto_SUCCESS;
OEMCrypto_SampleDescription fake_sample = sample;
for (size_t i = 0; i < sample.subsamples_length; ++i) {
const OEMCrypto_SubSampleDescription& original_subsample =