svl/source/misc/sharecontrolfile.cxx | 2 +- vcl/source/window/printdlg.cxx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
New commits: commit a9eeeb43c3b0254efbc69be82e1b7c8e34accf7e Author: Caolán McNamara <[email protected]> AuthorDate: Sun Aug 11 17:02:31 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Aug 12 16:48:43 2024 +0200 cid#1608408 silence Overflowed integer argument Change-Id: I769e235a3fd8760c34c9b31b4b94b652ad74cde5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171760 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx index 3a3579594240..9df41b54d77b 100644 --- a/svl/source/misc/sharecontrolfile.cxx +++ b/svl/source/misc/sharecontrolfile.cxx @@ -150,7 +150,7 @@ std::vector< o3tl::enumarray< LockFileComponent, OUString > > ShareControlFile:: if ( m_aUsersData.empty() ) { sal_Int64 nLength = m_xSeekable->getLength(); - if ( nLength > SAL_MAX_INT32 ) + if (nLength > SAL_MAX_INT32 || nLength < 0) throw uno::RuntimeException(); uno::Sequence< sal_Int8 > aBuffer( static_cast<sal_Int32>(nLength) ); commit fc54a739ec51e9ffcf06c87c24dc35a83b6d3534 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Aug 12 12:18:41 2024 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Aug 12 16:48:35 2024 +0200 cid#1616198 silence Arguments in wrong order Change-Id: I7be4ef1b27ddceb8ecdbe67c7985ad1e5bf47c2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171759 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 182b82ea9276..9e9e0f5edd92 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -859,6 +859,7 @@ void PrintDialog::setPaperSizes() int nRotatedSizeMatch = -1; Size aSizeOfPaper = aPrt->GetSizeOfPaper(); PaperInfo aPaperInfo(aSizeOfPaper.getWidth(), aSizeOfPaper.getHeight()); + // coverity[swapped_arguments : FALSE] - this is in the correct order PaperInfo aRotatedPaperInfo(aSizeOfPaper.getHeight(), aSizeOfPaper.getWidth()); const LocaleDataWrapper& rLocWrap(Application::GetSettings().GetLocaleDataWrapper()); o3tl::Length eUnit = o3tl::Length::mm;
