diff options
author | Matthew J. Francis <mjay.francis@gmail.com> | 2014-09-20 12:14:41 +0800 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-09-22 05:15:53 +0000 |
commit | 764e3016b62665281539af4e990ca4ff0445c26c (patch) | |
tree | f5ec6b10fa76e3f622d26095981e5c1a92c2485f /fpicker | |
parent | 935e8fc98c033680029e4531747a2f680f50d5ca (diff) |
fdo#84086 Fix assorted use-after-free bugs
Change-Id: Iec004fffdb0afbe27bd69f379db90f6d904a8a65
Reviewed-on: https://gerrit.libreoffice.org/11553
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/OfficeControlAccess.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index fe45acd860d0..1ac55e03fa52 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -238,7 +238,8 @@ namespace svt { Control* pControl = NULL; ControlDescription tmpDesc; - tmpDesc.pControlName = OUStringToOString(_rControlName, RTL_TEXTENCODING_UTF8).getStr(); + OString aControlName = OUStringToOString( _rControlName, RTL_TEXTENCODING_UTF8 ); + tmpDesc.pControlName = aControlName.getStr(); // translate the name into an id ControlDescRange aFoundRange = ::std::equal_range( s_pControls, s_pControlsEnd, tmpDesc, ControlDescriptionLookup() ); @@ -319,7 +320,8 @@ namespace svt bool OControlAccess::isControlSupported( const OUString& _rControlName ) { ControlDescription tmpDesc; - tmpDesc.pControlName = OUStringToOString(_rControlName, RTL_TEXTENCODING_UTF8).getStr(); + OString aControlName = OUStringToOString(_rControlName, RTL_TEXTENCODING_UTF8); + tmpDesc.pControlName = aControlName.getStr(); return ::std::binary_search( s_pControls, s_pControlsEnd, tmpDesc, ControlDescriptionLookup() ); } |