зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1626787 - ClearKeyDecryptionManager.cpp check emptiness by empty instead of by size. r=sylvestre
Emptiness of values should be checked using the `empty` method, and not by comparing the size to 0. Fix such case in the code of ClearKeyDecryptionManager.cpp module. Differential Revision: https://phabricator.services.mozilla.com/D70206 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2fdf5b0a0a
Коммит
a60ad3ae44
|
@ -258,7 +258,7 @@ Status ClearKeyDecryptor::Decrypt(uint8_t* aBuffer, uint32_t aBufferSize,
|
|||
// encrypted sample lengths are zero, and in this case, a zero length
|
||||
// IV is allowed.
|
||||
assert(aMetadata.mIV.size() == 8 || aMetadata.mIV.size() == 16 ||
|
||||
(aMetadata.mIV.size() == 0 && AllZero(aMetadata.mCipherBytes)));
|
||||
(aMetadata.mIV.empty() && AllZero(aMetadata.mCipherBytes)));
|
||||
|
||||
std::vector<uint8_t> iv(aMetadata.mIV);
|
||||
iv.insert(iv.end(), CENC_KEY_LEN - aMetadata.mIV.size(), 0);
|
||||
|
|
Загрузка…
Ссылка в новой задаче