summaryrefslogtreecommitdiff
path: root/oox/source/crypto
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-10-15 01:57:12 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-10-17 09:53:42 +0200
commitd51db77c8d87f210785a8a8c6dd875f7bacddb3c (patch)
treefd1ab208d49e85371fc9bb321539ce137bdaf719 /oox/source/crypto
parentc8eaadb5d70f42723517bb028f363e37726be256 (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 'oox/source/crypto')
-rw-r--r--oox/source/crypto/CryptTools.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx
index 5862bed9476a..6ca316b0a9b6 100644
--- a/oox/source/crypto/CryptTools.cxx
+++ b/oox/source/crypto/CryptTools.cxx
@@ -193,8 +193,7 @@ struct CryptoImpl
/*
* Initialization of IV is not needed because PK11_GetBestWrapMechanism should return ECB mode
*/
- SECItem tmp_sec_item;
- memset(&tmp_sec_item, 0, sizeof(tmp_sec_item));
+ SECItem tmp_sec_item = {};
mWrapKeyContext = PK11_CreateContextBySymKey(wrap_mechanism, CKA_ENCRYPT, mWrapKey, &tmp_sec_item);
if (!mWrapKeyContext)
throw css::uno::RuntimeException("PK11_CreateContextBySymKey failure", css::uno::Reference<css::uno::XInterface>());
@@ -214,8 +213,7 @@ struct CryptoImpl
/*
* Finally unwrap sym key
*/
- SECItem wrapped_key;
- memset(&tmp_sec_item, 0, sizeof(tmp_sec_item));
+ SECItem wrapped_key = {};
wrapped_key.data = wrapped_key_data;
wrapped_key.len = wrapped_key_len;