summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-01-20 12:48:50 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-01-21 18:24:12 +0100
commit512e8c5ebb8cc398ae3ca316de70f008b9646011 (patch)
tree8c5bfb4e2157c2e7306e2a25c1257333f8f82fd5
parenttdf#140020: Disable also menu File->SaveAll for docs with LockSave (diff)
downloadcore-512e8c5ebb8cc398ae3ca316de70f008b9646011.tar.gz
core-512e8c5ebb8cc398ae3ca316de70f008b9646011.zip
comphelper: fix UAF in SequenceOutputStreamService dtor
Change-Id: I91f77ee9ab4d509ebee3d04f94a3c63986de0ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128657 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 03e8e1a408eef3c8acc5545416eda9d0938e21f7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128669 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--comphelper/source/streaming/seqoutputstreamserv.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx
index 84900014aad4..a9a0ae8f5a98 100644
--- a/comphelper/source/streaming/seqoutputstreamserv.cxx
+++ b/comphelper/source/streaming/seqoutputstreamserv.cxx
@@ -63,8 +63,9 @@ private:
std::mutex m_aMutex;
- uno::Reference< io::XOutputStream > m_xOutputStream;
+ // WARNING: dtor of m_xOutputStream writes into m_aSequence so that must live longer!
uno::Sequence< ::sal_Int8 > m_aSequence;
+ uno::Reference< io::XOutputStream > m_xOutputStream;
};
SequenceOutputStreamService::SequenceOutputStreamService()
{