summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhimajin100000 <himajin100000@gmail.com>2018-03-12 04:52:30 +0900
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-03-14 00:19:38 +0100
commit32f42d093d4408666151d03f04823e2bb39e46cd (patch)
tree7d9405244190805524646e0cfd7d5afbadee21c8
parentfd67ee14e769ebdf1e43d55e0117f70f90d53053 (diff)
tdf#116351: fix re-use of AttributeList on PGP manifest
multiple attributes of the same name on the same element, because AttributeList was wrongly re-used Change-Id: I29b2317ce3d836d7349fa0474709726bed2c5ad4 Reviewed-on: https://gerrit.libreoffice.org/51087 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--package/source/manifest/ManifestExport.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
index 46ace993b581..2c819b346ff0 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -232,8 +232,6 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > con
{
// yeah, so that goes directly below the manifest:manifest
// element
- ::comphelper::AttributeList * pNewAttrList = new ::comphelper::AttributeList;
- uno::Reference < xml::sax::XAttributeList > xNewAttrList (pNewAttrList);
OUStringBuffer aBuffer;
xHandler->ignorableWhitespace ( sWhiteSpace );
@@ -268,6 +266,8 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > con
xHandler->startElement( sEncryptedKeyElement, nullptr );
xHandler->ignorableWhitespace ( sWhiteSpace );
+ ::comphelper::AttributeList * pNewAttrList = new ::comphelper::AttributeList;
+ uno::Reference < xml::sax::XAttributeList > xNewAttrList (pNewAttrList);
// TODO: the algorithm should rather be configurable
pNewAttrList->AddAttribute ( sAlgorithmAttribute, sCdataAttribute,
"http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p" );