sc/source/core/tool/interpr1.cxx |    5 ++
 sd/source/ui/dlg/animobjs.cxx    |   79 ++++++++++++++++++++-------------------
 2 files changed, 47 insertions(+), 37 deletions(-)

New commits:
commit 40468f0eb08ea8f83b23cceeeaf7f4beb3ba15ed
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Oct 16 21:18:20 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Oct 26 21:54:46 2024 +0200

    cid#1606758 Overflowed constant
    
    Change-Id: Ia1a3937159186b137b40036f1872d6156ebc0512
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175685
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 6a45d78aa655..84ee63f23b92 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8752,6 +8752,11 @@ void ScInterpreter::ScSortBy()
                 return;
             }
             pMatSrc->GetDimensions(nsC, nsR);
+            if (nsC == 0 || nsR == 0)
+            {
+                PushIllegalArgument();
+                return;
+            }
             nSortCol2 = nsC - 1; // nSortCol1 = 0
             nSortRow2 = nsR - 1; // nSortRow1 = 0
         }
commit 868158d6b21a8446d75f1601fa39366b1f54d52c
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Oct 26 18:48:32 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Oct 26 21:54:38 2024 +0200

    cid#1608133 Overflowed constant
    
    Change-Id: I38651265938cf076078c34f359b7f3f9ea3728c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175684
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index fd58db937d89..daf5011aa7de 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -280,55 +280,60 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, weld::Button&, 
rButton, void )
     sal_uLong nTmpTime = 0;
     size_t i = 0;
     bool bCount = i < nCount;
-    if( bReverse )
+    if (bCount)
     {
-        i = nCount - 1;
-    }
-    while( bCount && bMovie )
-    {
-        // make list and view consistent
-        assert(i < m_FrameList.size());
-        m_nCurrentFrame = i;
-
-        UpdateControl(bDisableCtrls);
+        if( bReverse )
+            i = nCount - 1;
 
-        if( m_xRbtBitmap->get_active() )
+        while (bMovie)
         {
-            ::tools::Time const & rTime = m_FrameList[i].second;
+            // make list and view consistent
+            assert(i < m_FrameList.size());
+            m_nCurrentFrame = i;
 
-            m_xFormatter->SetTime( rTime );
-            sal_uLong nTime = rTime.GetMSFromTime();
+            UpdateControl(bDisableCtrls);
 
-            WaitInEffect( nTime, nTmpTime, pProgress.get() );
-            nTmpTime += nTime;
-        }
-        else
-        {
-            WaitInEffect( 100, nTmpTime, pProgress.get() );
-            nTmpTime += 100;
-        }
-        if( bReverse )
-        {
-            if (i == 0)
+            if( m_xRbtBitmap->get_active() )
             {
-                // Terminate loop.
-                bCount = false;
+                ::tools::Time const & rTime = m_FrameList[i].second;
+
+                m_xFormatter->SetTime( rTime );
+                sal_uLong nTime = rTime.GetMSFromTime();
+
+                WaitInEffect( nTime, nTmpTime, pProgress.get() );
+                nTmpTime += nTime;
             }
             else
             {
-                --i;
+                WaitInEffect( 100, nTmpTime, pProgress.get() );
+                nTmpTime += 100;
             }
-        }
-        else
-        {
-            i++;
-            if (i >= nCount)
+            if( bReverse )
+            {
+                if (i == 0)
+                {
+                    // Terminate loop.
+                    bCount = false;
+                }
+                else
+                {
+                    --i;
+                }
+            }
+            else
             {
-                // Terminate loop.
-                bCount = false;
-                // Move i back into valid range.
-                i = nCount - 1;
+                i++;
+                if (i >= nCount)
+                {
+                    // Terminate loop.
+                    bCount = false;
+                    // Move i back into valid range.
+                    i = nCount - 1;
+                }
             }
+
+            if (!bCount)
+                break;
         }
     }
 

Reply via email to