diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-01-20 12:48:50 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2022-01-21 18:24:12 +0100 |
commit | 512e8c5ebb8cc398ae3ca316de70f008b9646011 (patch) | |
tree | 8c5bfb4e2157c2e7306e2a25c1257333f8f82fd5 | |
parent | tdf#140020: Disable also menu File->SaveAll for docs with LockSave (diff) | |
download | core-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.cxx | 3 |
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() { |