[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - package/source

himajin100000 himajin100000 at gmail.com
Thu Mar 15 15:46:54 UTC 2018


 package/source/manifest/ManifestExport.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ce5d2cd0d9fe0c04fde50ba54fb4ca154f2bdf12
Author: himajin100000 <himajin100000 at gmail.com>
Date:   Mon Mar 12 04:52:30 2018 +0900

    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 at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 32f42d093d4408666151d03f04823e2bb39e46cd)
    Reviewed-on: https://gerrit.libreoffice.org/51250
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
index 5cf87334ca62..d8c00cf5f9a0 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -231,8 +231,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 );
@@ -267,6 +265,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" );


More information about the Libreoffice-commits mailing list