summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-09-19 21:43:23 +0200
committerCaolán McNamara <caolanm@redhat.com>2017-09-24 17:25:25 +0200
commite68c82d2c194aafc6406f9f27caa2d1e70a7614e (patch)
treea0482b508c4bece767b234918f39ccbfcf66eae1 /xmloff/source
parent65c99825ceb08743a70b6e598f65491a67d9a884 (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/42505 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/core/xmlexp.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index aced8d37b245..cb12d33b11d5 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1296,7 +1296,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(),