sw/source/uibase/shells/listsh.cxx |    1 +
 tools/source/datetime/tdate.cxx    |    1 +
 2 files changed, 2 insertions(+)

New commits:
commit 9c7cf67e9cda47df632b582d2bc0dc0233168b2a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Oct 14 12:55:16 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Oct 14 16:59:01 2024 +0200

    cid#1607017 Overflowed integer argument
    
    Change-Id: I20af21e740e77e2b190c613346ed57bcd40b2a2e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174892
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/shells/listsh.cxx 
b/sw/source/uibase/shells/listsh.cxx
index 2590f8dd4d60..45ec7c6df6c4 100644
--- a/sw/source/uibase/shells/listsh.cxx
+++ b/sw/source/uibase/shells/listsh.cxx
@@ -79,6 +79,7 @@ static void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, 
bool bMove, bool bU
             {
                 // The current subpoint which should be moved
                 // starts at nActPos and ends at nActEndPos - 1
+                assert(nActEndPos > 0);
                 --nActEndPos;
                 SwOutlineNodes::size_type nDest = nActEndPos + 2;
                 while ( nDest < pIDoc->getOutlineNodesCount() &&
commit 6402a656cd0083001aaa6eeaac188ee16fcbfc8c
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Oct 14 13:15:29 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Oct 14 16:58:51 2024 +0200

    cid#1607163 Overflowed return value
    
    Change-Id: I403a2c5bb55e3a80d3bf99302b262aa507812d68
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174895
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index e20add430353..03ec18e6f394 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -211,6 +211,7 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
 {
     short nWeek;
     short n1WDay = static_cast<short>(Date( 1, 1, GetYear() ).GetDayOfWeek());
+    assert(n1WDay >= 0);
     short nDayOfYear = static_cast<short>(GetDayOfYear());
 
     // weekdays start at 0, thus decrement one

Reply via email to