diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-09-19 21:43:23 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-09-19 22:18:44 +0200 |
commit | ee599ea46365adc37f4d495d9ff9778c25c04c92 (patch) | |
tree | bed908d9d1944477cceedbaacb8bda83450a1d3e /xmloff | |
parent | eba34a557cdacd6a39d2e86fadc25eb1e2707b57 (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
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 78a798ecd3a7..a805ef7ac5e4 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1285,7 +1285,7 @@ ErrCode SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) { try { - ::comphelper::PropertyMapEntry const aInfoMap[] = + static ::comphelper::PropertyMapEntry const aInfoMap[] = { { OUString("Class"), 0, ::cppu::UnoType<OUString>::get(), |