diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-10-15 01:57:12 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-17 09:53:42 +0200 |
commit | d51db77c8d87f210785a8a8c6dd875f7bacddb3c (patch) | |
tree | fd1ab208d49e85371fc9bb321539ce137bdaf719 /include/filter | |
parent | c8eaadb5d70f42723517bb028f363e37726be256 (diff) |
Remove some memset calls
Replace them with default initialization or calloc
Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1
Reviewed-on: https://gerrit.libreoffice.org/80805
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/filter')
-rw-r--r-- | include/filter/msfilter/mscodec.hxx | 14 | ||||
-rw-r--r-- | include/filter/msfilter/svdfppt.hxx | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/include/filter/msfilter/mscodec.hxx b/include/filter/msfilter/mscodec.hxx index bc0240ae20eb..a56694e9e1bd 100644 --- a/include/filter/msfilter/mscodec.hxx +++ b/include/filter/msfilter/mscodec.hxx @@ -121,7 +121,7 @@ public: void Skip( std::size_t nBytes ); protected: - sal_uInt8 mpnKey[ 16 ]; /// Encryption key. + sal_uInt8 mpnKey[ 16 ] = {}; /// Encryption key. std::size_t mnOffset; /// Key offset. private: @@ -463,10 +463,10 @@ struct MSFILTER_DLLPUBLIC EncryptionStandardHeader struct MSFILTER_DLLPUBLIC EncryptionVerifierAES { sal_uInt32 saltSize; // must be 0x00000010 - sal_uInt8 salt[SALT_LENGTH]; // random generated salt value - sal_uInt8 encryptedVerifier[ENCRYPTED_VERIFIER_LENGTH]; // randomly generated verifier value + sal_uInt8 salt[SALT_LENGTH] = {}; // random generated salt value + sal_uInt8 encryptedVerifier[ENCRYPTED_VERIFIER_LENGTH] = {}; // randomly generated verifier value sal_uInt32 encryptedVerifierHashSize; // actually written hash size - depends on algorithm - sal_uInt8 encryptedVerifierHash[SHA256_HASH_LENGTH]; // verifier value hash - itself also encrypted + sal_uInt8 encryptedVerifierHash[SHA256_HASH_LENGTH] = {}; // verifier value hash - itself also encrypted EncryptionVerifierAES(); }; @@ -474,10 +474,10 @@ struct MSFILTER_DLLPUBLIC EncryptionVerifierAES struct MSFILTER_DLLPUBLIC EncryptionVerifierRC4 { sal_uInt32 saltSize; // must be 0x00000010 - sal_uInt8 salt[SALT_LENGTH]; // random generated salt value - sal_uInt8 encryptedVerifier[ENCRYPTED_VERIFIER_LENGTH]; // randomly generated verifier value + sal_uInt8 salt[SALT_LENGTH] = {}; // random generated salt value + sal_uInt8 encryptedVerifier[ENCRYPTED_VERIFIER_LENGTH] = {}; // randomly generated verifier value sal_uInt32 encryptedVerifierHashSize; // actually written hash size - depends on algorithm - sal_uInt8 encryptedVerifierHash[SHA1_HASH_LENGTH]; // verifier value hash - itself also encrypted + sal_uInt8 encryptedVerifierHash[SHA1_HASH_LENGTH] = {}; // verifier value hash - itself also encrypted EncryptionVerifierRC4(); }; diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index 070aecae01ce..2720a0612c21 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -257,7 +257,7 @@ public: struct PptColorSchemeAtom { - sal_uInt8 aData[32]; + sal_uInt8 aData[32] = {}; public: PptColorSchemeAtom(); @@ -979,8 +979,8 @@ struct PPTRuler : public salhelper::SimpleReferenceObject { sal_Int32 nFlags; sal_uInt16 nDefaultTab; - sal_uInt16 nTextOfs[nMaxPPTLevels]; - sal_uInt16 nBulletOfs[nMaxPPTLevels]; + sal_uInt16 nTextOfs[nMaxPPTLevels] = {}; + sal_uInt16 nBulletOfs[nMaxPPTLevels] = {}; std::unique_ptr<PPTTabEntry[]> pTab; sal_uInt16 nTabCount; |