[Libreoffice-commits] core.git: oox/source

Caolán McNamara caolanm at redhat.com
Mon Dec 4 17:21:05 UTC 2017


 oox/source/crypto/Standard2007Engine.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5fe781828506862c0bfcabb224418e038bee584d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 4 11:22:53 2017 +0000

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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);
 


More information about the Libreoffice-commits mailing list