basegfx/source/inc/hommatrixtemplate.hxx | 17 ++++++++++------- winaccessibility/source/UAccCOM/MAccessible.cxx | 4 ++-- 2 files changed, 12 insertions(+), 9 deletions(-)
New commits: commit a43712a9232eea1a439be95e8a30ee833dd4bff4 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Oct 19 14:02:04 2018 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Oct 20 13:48:17 2018 +0200 check for self assign Change-Id: I1d8ae37c3f3fc41d5ec65bb246e891d76f7ff544 Reviewed-on: https://gerrit.libreoffice.org/62006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/basegfx/source/inc/hommatrixtemplate.hxx b/basegfx/source/inc/hommatrixtemplate.hxx index b7106f6fb22d..667e7ecdb3b0 100644 --- a/basegfx/source/inc/hommatrixtemplate.hxx +++ b/basegfx/source/inc/hommatrixtemplate.hxx @@ -119,14 +119,17 @@ namespace basegfx ImplHomMatrixTemplate& operator=(const ImplHomMatrixTemplate& rToBeCopied) { - // complete initialization using copy - for(sal_uInt16 a(0); a < (RowSize - 1); a++) + if (this != &rToBeCopied) { - memcpy(&maLine[a], &rToBeCopied.maLine[a], sizeof(ImplMatLine< RowSize >)); - } - if(rToBeCopied.mpLine) - { - mpLine.reset( new ImplMatLine< RowSize >((RowSize - 1), rToBeCopied.mpLine.get()) ); + // complete initialization using copy + for(sal_uInt16 a(0); a < (RowSize - 1); a++) + { + memcpy(&maLine[a], &rToBeCopied.maLine[a], sizeof(ImplMatLine< RowSize >)); + } + if(rToBeCopied.mpLine) + { + mpLine.reset( new ImplMatLine< RowSize >((RowSize - 1), rToBeCopied.mpLine.get()) ); + } } return *this; } commit d585e572b5d4fc7113c0d0380f16427c1e3448d8 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Oct 19 14:14:20 2018 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Oct 20 13:48:06 2018 +0200 alloc should have been free Change-Id: I325a815ff17446bc389f889a028f5e2ced57d7e7 Reviewed-on: https://gerrit.libreoffice.org/62008 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 1f6e36531d17..0a75d9a4e5a8 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -1075,7 +1075,7 @@ STDMETHODIMP CMAccessible::put_accValue(VARIANT varChild, BSTR szValue) { if(varChild.lVal==CHILDID_SELF) { - SysAllocString(m_pszValue); + SAFE_SYSFREESTRING(m_pszValue); m_pszValue=SysAllocString(szValue); return S_OK; } @@ -1109,7 +1109,7 @@ STDMETHODIMP CMAccessible::Put_XAccName(const OLECHAR __RPC_FAR *pszName) return E_INVALIDARG; } - SAFE_SYSFREESTRING(m_pszName);//?? + SAFE_SYSFREESTRING(m_pszName); m_pszName = SysAllocString(pszName); if(m_pszName==nullptr) return E_FAIL; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
