oox/source/crypto/AgileEngine.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 11112bdb2d6bd411263ee65a448d33421599cbfa Author: Caolán McNamara <[email protected]> AuthorDate: Wed Jul 22 10:38:35 2020 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Jul 22 12:52:20 2020 +0200 ofz#24317 hash too short Change-Id: I6b2df62f0d18c6918a82a002f1e9a364c877caf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99211 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx index 008b29462c0d..e1ce103c5d0c 100644 --- a/oox/source/crypto/AgileEngine.cxx +++ b/oox/source/crypto/AgileEngine.cxx @@ -322,7 +322,9 @@ bool AgileEngine::decryptAndCheckVerifierHash(OUString const & rPassword) calculateHashFinal(rPassword, hashFinal); std::vector<sal_uInt8>& encryptedHashInput = mInfo.encryptedVerifierHashInput; - std::vector<sal_uInt8> hashInput(mInfo.saltSize, 0); + // SALT - needs to be a multiple of block size (?) + sal_Int32 nSaltSize = roundUp(mInfo.saltSize, mInfo.blockSize); + std::vector<sal_uInt8> hashInput(nSaltSize, 0); calculateBlock(constBlock1, hashFinal, encryptedHashInput, hashInput); std::vector<sal_uInt8>& encryptedHashValue = mInfo.encryptedVerifierHashValue; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
