diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-04 11:22:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-04 18:19:45 +0100 |
commit | 5fe781828506862c0bfcabb224418e038bee584d (patch) | |
tree | f1be26755b597e8761368dbec172f844157c8409 | |
parent | bfd613a4628c8827168f64fc2a97685785d04a84 (diff) |
ofz#4526 Null-reference READ with openssl crypto backend
which is not the default backend
Change-Id: I982e1b61c10efbe3312d68d90d48292a9b6cca0d
Reviewed-on: https://gerrit.libreoffice.org/45794
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | oox/source/crypto/Standard2007Engine.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx index 1f39a9aab410..748911612a8f 100644 --- a/oox/source/crypto/Standard2007Engine.cxx +++ b/oox/source/crypto/Standard2007Engine.cxx @@ -124,6 +124,8 @@ bool Standard2007Engine::generateEncryptionKey(const OUString& password) { mKey.clear(); mKey.resize(mInfo.header.keyBits / 8, 0); + if (mKey.empty()) + return false; calculateEncryptionKey(password); |