sw/source/uibase/utlui/glbltree.cxx |    4 +++-
 vcl/source/filter/imet/ios2met.cxx  |    8 +++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit f6f581dad7817f19a575063dc6e60e57b0f47ccd
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Aug 30 09:48:50 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Sep 1 15:33:57 2024 +0200

    cid#1607909 silence Overflowed constant
    
    Change-Id: I83f504fcbc345753e9eb5b322b89ae76995794de
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172714
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/source/filter/imet/ios2met.cxx 
b/vcl/source/filter/imet/ios2met.cxx
index 6e43c50f5986..3b6077a648a3 100644
--- a/vcl/source/filter/imet/ios2met.cxx
+++ b/vcl/source/filter/imet/ios2met.cxx
@@ -2019,9 +2019,11 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, 
sal_uInt16 nOrderLen)
             [[fallthrough]];
         case GOrdSLnWdt: {
             sal_uInt8 nbyte(0);
-            pOS2MET->ReadUChar( nbyte );
-            if (nbyte==0) aAttr.nLinWidth=aDefAttr.nLinWidth;
-            else aAttr.nLinWidth=static_cast<sal_uInt16>(nbyte)-1;
+            pOS2MET->ReadUChar(nbyte);
+            if (nbyte > 0)
+                aAttr.nLinWidth = static_cast<sal_uInt16>(nbyte)-1;
+            else
+                aAttr.nLinWidth = aDefAttr.nLinWidth;
             break;
         }
         case GOrdPFrLWd: PushAttr(nOrderID);
commit 84ef34c1b20e5c1ceafd98072e47d4172b0ca21d
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Aug 30 09:54:53 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Sep 1 15:33:50 2024 +0200

    cid#1607865 silence Overflowed constant
    
    Change-Id: Ie008b4e09d4839726ae0e2db912393552d92c23a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172713
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/uibase/utlui/glbltree.cxx 
b/sw/source/uibase/utlui/glbltree.cxx
index 39c75aefc553..771785e1cca0 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -197,8 +197,10 @@ sal_Int8 SwGlobalTreeDropTarget::ExecuteDrop( const 
ExecuteDropEvent& rEvt )
             // Get data
             FileList aFileList;
             aData.GetFileList( SotClipboardFormatId::FILE_LIST, aFileList );
-            for ( size_t n = aFileList.Count(); n--; )
+            size_t n = aFileList.Count();
+            while (n)
             {
+                --n;
                 sFileName = aFileList.GetFile(n);
                 m_rTreeView.InsertRegion(pCnt, &sFileName);
                 // The list of contents must be newly fetched after inserting,

Reply via email to