[Libreoffice-commits] core.git: connectivity/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 24 20:22:46 UTC 2019


 connectivity/source/commontools/FValue.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 30320abbef8fabfeadda2b31b72f595c4a1c1ed9
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 24 11:22:58 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jul 24 22:21:32 2019 +0200

    cid#1448360 Assignment of overlapping memory
    
    Change-Id: Ifefa007ff7534e65cc35cdbcb4983012b36ed6e0
    Reviewed-on: https://gerrit.libreoffice.org/76248
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 61f344bb92b5..51adab4f3e98 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -2086,11 +2086,19 @@ void ORowSetValue::setSigned(bool _bMod)
                     }
                     break;
                 case DataType::BIGINT:
+                {
                     if ( m_bSigned )
-                        m_aValue.m_nInt64 = static_cast<sal_Int64>(m_aValue.m_uInt64);
+                    {
+                        auto nTmp = static_cast<sal_Int64>(m_aValue.m_uInt64);
+                        m_aValue.m_nInt64 = nTmp;
+                    }
                     else
-                        m_aValue.m_uInt64 = static_cast<sal_uInt64>(m_aValue.m_nInt64);
+                    {
+                        auto nTmp = static_cast<sal_uInt64>(m_aValue.m_nInt64);
+                        m_aValue.m_uInt64 = nTmp;
+                    }
                     break;
+                }
             }
             m_eTypeKind = nType;
         }


More information about the Libreoffice-commits mailing list