diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-09-19 21:43:23 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-08-01 15:32:41 +0200 |
commit | 126ac0b67b306bab333f9e13433dda0728229bf7 (patch) | |
tree | 5ce2d2172b9d14f31ce0c8a39688a2fbdf97aead /xmloff | |
parent | a37e99bbd23fffa518c934d46014cee3afcb222b (diff) |
xmloff: fix stack-use-after-return in SvXMLExport::exportDoc()
PropertySetInfo(PropertyMapEntry const * pMap) stores the pointers,
and its lifetime is controlled by refcounting, so the lifetime
of aInfoMap can't be automatic.
ERROR: AddressSanitizer: stack-use-after-return on address ...
... is located in stack of thread T46
at offset 224 in frame SvXMLExport::exportDoc(xmloff::token::XMLTokenEnum)
This frame has 39 object(s):
...
[224, 288) 'aInfoMap' <== Memory access at offset 224 is inside this variable
Change-Id: I4eaa9d38bab708b222d999b0982100d7ef97e95c
(cherry picked from commit ee599ea46365adc37f4d495d9ff9778c25c04c92)
Reviewed-on: https://gerrit.libreoffice.org/42504
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 89a5b2c31b4c9d5e068e9d1aef2eac50d70df80e)
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 484216087e0d..950118f4e2ca 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1297,7 +1297,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) { try { - ::comphelper::PropertyMapEntry const aInfoMap[] = + static ::comphelper::PropertyMapEntry const aInfoMap[] = { { OUString("Class"), 0, ::cppu::UnoType<OUString>::get(), |