chart2/source/model/main/ChartModel.cxx |    1 +
 hwpfilter/source/hcode.cxx              |   11 ++++-------
 sd/source/core/stlpool.cxx              |    8 +++-----
 3 files changed, 8 insertions(+), 12 deletions(-)

New commits:
commit bbac45eabed6464f85738e372ea6c2e4f23a11a0
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Sep 24 19:39:41 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Sep 25 15:37:54 2024 +0200

    cid#1606887 Data race condition
    
    and
    
    cid#1607140 Data race condition
    
    Change-Id: Ie27b42012b945bfad0c7344c734dc0b8f0816e70
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173898
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/chart2/source/model/main/ChartModel.cxx 
b/chart2/source/model/main/ChartModel.cxx
index 4e97f9c99820..022446666c2b 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -995,6 +995,7 @@ uno::Any SAL_CALL ChartModel::queryInterface( const 
uno::Type& aType )
 // ____ XCloneable ____
 Reference< util::XCloneable > SAL_CALL ChartModel::createClone()
 {
+    std::unique_lock aGuard(m_aLifeTimeManager.m_aAccessMutex);
     return Reference< util::XCloneable >( new ChartModel( *this ));
 }
 
commit c30fa95c5d0e03c523d22d01be3ae4ce3b79c723
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Sep 24 19:45:58 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Sep 25 15:37:40 2024 +0200

    cid#1607313 silence Overflowed return value
    
    and
    
    cid#1608099 Overflowed constant
    
    Change-Id: I10e08c1184bb6630b849c3e24a0c9b26302fd18a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173896
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx
index 8bb22e06c956..9616529bbb33 100644
--- a/hwpfilter/source/hcode.cxx
+++ b/hwpfilter/source/hcode.cxx
@@ -522,19 +522,16 @@ static int KsSearch(hchar c)
 
 static hchar cdkssm2ks_han(hchar kssm)
 {
-    unsigned int index;
-    unsigned char lo, hi;
-
 /* "One" */
     if (kssm == 0xd3c5)
         return 0xc7d1;
 
-    index = KsSearch(kssm);
+    unsigned int index = KsSearch(kssm);
     if (kssm != ksTbl[index])
         return jaso2ks(kssm);
-    hi = sal::static_int_cast<char>(index / (0xFE - 0xA1 + 1) + 0xB0);
-    lo = sal::static_int_cast<unsigned char>(index % (0xFE - 0xA1 + 1) + 0xA1);
-    return lo | (hi << 8);
+    unsigned char hi(index / (0xFE - 0xA1 + 1) + 0xB0);
+    unsigned char lo(index % (0xFE - 0xA1 + 1) + 0xA1);
+    return hchar(lo | (hi << 8));
 }
 
 
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 8ab0716d533f..2cfd2544fe00 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -978,12 +978,10 @@ void SdStyleSheetPool::UpdateStdNames()
             if( bHelpKnown )
             {
                 OUString aNewName;
-                if (pNameId)
+                if (pNameId && pNameId == STR_PSEUDOSHEET_OUTLINE)
                 {
-                    if (pNameId == STR_PSEUDOSHEET_OUTLINE)
-                    {
-                        aNewName += " " + OUString::number( sal_Int32( nHelpId 
- HID_PSEUDOSHEET_OUTLINE ) );
-                    }
+                    assert(nHelpId >= HID_PSEUDOSHEET_OUTLINE1 && nHelpId <= 
HID_PSEUDOSHEET_OUTLINE9);
+                    aNewName += " " + OUString::number( sal_Int32( nHelpId - 
HID_PSEUDOSHEET_OUTLINE ) );
                 }
 
                 if( !aNewName.isEmpty() && aNewName != aOldName )

Reply via email to