sal/osl/unx/file.cxx          |    6 ++++++
 sw/source/ui/fldui/flddok.cxx |    7 +------
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 03aa64c6ba0ac20be5433b7f7963a99d824a92de
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jul 13 16:31:43 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Jul 14 09:47:55 2025 +0200

    cid#1659047 silence bogus Copy into fixed size buffer
    
    and
    
    cid#1659045 Copy into fixed size buffer
    
    Change-Id: Ifc9cd9e08886bb3b3ff123f09490cfd2e35b16ea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187812
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index c37840d7f93a..a07c08020e36 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -884,7 +884,10 @@ void setAllowedPaths(
             if (notExists || !isResolved || strlen(resolvedPath) + 
aPath.getLength() - n + 1 >= PATH_MAX)
                 return; // too bad
             else
+            {
+                // coverity[fixed_size_dest : FALSE] - safe, see check above
                 strcat(resolvedPath, aPath.getStr() + n);
+            }
         }
 
         if (isResolved)
@@ -928,7 +931,10 @@ bool isForbidden(const OString &filePath, sal_uInt32 
nFlags)
         else if (!isResolved || strlen(resolvedPath) + filePath.getLength() - 
n + 1 >= PATH_MAX)
             return true; // too bad
         else
+        {
+            // coverity[fixed_size_dest : FALSE] - safe, see check above
             strcat(resolvedPath, filePath.getStr() + n);
+        }
     }
 
     const std::vector<OString> *pCheckPaths = &allowedPathsRead;
commit 832161fc95fb09b0efeca08f42c888d1809b0054
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jul 13 16:24:41 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Jul 14 09:47:48 2025 +0200

    cid#1659048 Logically dead code
    
    we return early for SwFieldTypesEnum::Author above
    
    Change-Id: I8f1f6439d2f1c392fe6c8800aaba3f1a2e38fe9f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187811
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 9b4e3b7b2956..c970824d18b7 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -491,12 +491,7 @@ sal_Int32 SwFieldDokPage::FillFormatLB(SwFieldTypesEnum 
nTypeId)
 
     if (IsFieldEdit())
     {
-        if (nTypeId == SwFieldTypesEnum::Author)
-        {
-            SwAuthorFormat nFormat = static_cast<const 
SwAuthorField*>(GetCurField())->GetFormat() & ~SwAuthorFormat::Fixed;
-            
m_xFormatLB->select_id(OUString::number(static_cast<sal_uInt32>(nFormat)));
-        }
-        else if (nTypeId == SwFieldTypesEnum::ExtendedUser)
+        if (nTypeId == SwFieldTypesEnum::ExtendedUser)
         {
             SwAuthorFormat nFormat = static_cast<const 
SwExtUserField*>(GetCurField())->GetFormat() & ~SwAuthorFormat::Fixed;
             
m_xFormatLB->select_id(OUString::number(static_cast<sal_uInt32>(nFormat)));

Reply via email to