From 27728d21e479007a7534e2759e464ebfe10a4e70 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 22 Feb 2017 21:22:34 +0100 Subject: [PATCH] Better make the zero-initialization more explicit ...if initializing these members is necessary at all; a bit hard to tell from the code. Change-Id: If15fb11b601ba3b8b5d3fdbe5c3dac01b095fb05 --- oox/source/crypto/DocumentDecryption.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx index f93f9031f260..0209f3d24ba5 100644 --- a/oox/source/crypto/DocumentDecryption.cxx +++ b/oox/source/crypto/DocumentDecryption.cxx @@ -191,9 +191,14 @@ bool DocumentDecryption::generateEncryptionKey(const OUString& rPassword) bool DocumentDecryption::readAgileEncryptionInfo(Reference< XInputStream >& xInputStream) { - AgileEngine* engine = new AgileEngine(); + AgileEngine* engine = new AgileEngine; mEngine.reset(engine); AgileEncryptionInfo& info = engine->getInfo(); + info.spinCount = 0; + info.saltSize = 0; + info.keyBits = 0; + info.hashSize = 0; + info.blockSize = 0; Reference xFastDocumentHandler( new AgileDocumentHandler(info) ); Reference xFastTokenHandler ( new AgileTokenHandler );