summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-01-20 12:48:50 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-01-20 14:59:41 +0100
commit03e8e1a408eef3c8acc5545416eda9d0938e21f7 (patch)
treec8889e583e8075d5f94dafa9b66b829db46a90b0 /comphelper
parent1499ba1213f353238ee4c5acfb4fc626c5f37ca6 (diff)
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>
Diffstat (limited to 'comphelper')
-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 d70377d70f48..19ef79002978 100644
--- a/comphelper/source/streaming/seqoutputstreamserv.cxx
+++ b/comphelper/source/streaming/seqoutputstreamserv.cxx
@@ -62,8 +62,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()
{