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

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Sat Jun 5 17:08:52 UTC 2021


 oox/source/crypto/CryptTools.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 399a6472f666ae6c3e20b6f8367f9fd089c15605
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Jun 5 08:09:40 2021 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Jun 5 19:08:08 2021 +0200

    Potentially uninitialized local variable 'aEvpMd' used
    
    Seen on Win10:
    cd C:/cygwin/home/serva/lode/dev/core/oox && C:/cygwin/home/serva/lode/opt/bin/make -j 1 -rs build
    [build DEP] LNK:Library/ooxlo.dll
    [build CXX] oox/source/crypto/CryptTools.cxx
    C:\cygwin\home\serva\lode\dev\core\oox\source\crypto\CryptTools.cxx(122) : error C2220: the following warning is treated as an error
    C:\cygwin\home\serva\lode\dev\core\oox\source\crypto\CryptTools.cxx(122) : warning C4701: potentially uninitialized local variable 'aEvpMd' used
    C:\cygwin\home\serva\lode\dev\core\oox\source\crypto\CryptTools.cxx(122) : warning C4703: potentially uninitialized local pointer variable 'aEvpMd' used
    make[1]: *** [C:/cygwin/home/serva/lode/dev/core/solenv/gbuild/LinkTarget.mk:301: C:/cygwin/home/serva/lode/dev/core/workdir/CxxObject/oox/source/crypto/CryptTools.o] Error 2
    make: *** [Makefile:122: oox.build] Error 2
    
    Change-Id: Id9409c95aa3edf866671ef8418e7ade3cbc1e718
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116740
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx
index 77b6f8c11988..6baf1f98ae98 100644
--- a/oox/source/crypto/CryptTools.cxx
+++ b/oox/source/crypto/CryptTools.cxx
@@ -109,7 +109,7 @@ struct CryptoImpl
     void setupCryptoHashContext(std::vector<sal_uInt8>& rKey, CryptoHashType eType)
     {
         mpHmacContext.reset(HMAC_CTX_new());
-        const EVP_MD* aEvpMd;
+        const EVP_MD* aEvpMd = nullptr;
         switch (eType)
         {
             case CryptoHashType::SHA1:


More information about the Libreoffice-commits mailing list