summaryrefslogtreecommitdiff
path: root/oox/source/crypto/AgileEngine.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/crypto/AgileEngine.cxx')
-rw-r--r--oox/source/crypto/AgileEngine.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index 72539509c965..b12e8d344c6b 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -130,7 +130,7 @@ bool AgileEngine::generateEncryptionKey(const OUString& rPassword)
std::vector<sal_uInt8> hash(mInfo.hashSize, 0);
hashCalc(hash, hashInput, mInfo.hashAlgorithm);
- if (std::equal (hash.begin(), hash.end(), hashValue.begin()) )
+ if (hash.size() <= hashValue.size() && std::equal(hash.begin(), hash.end(), hashValue.begin()))
{
std::vector<sal_uInt8>& encryptedKeyValue = mInfo.encryptedKeyValue;
calculateBlock(constBlock3, hashFinal, encryptedKeyValue, mKey);