binaryurp/source/reader.cxx | 2 +- sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 1fe266c22fb7d277ae612cffd6cc89ef4dcb4269 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Jun 1 11:57:30 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Jun 1 16:02:34 2022 +0200 Resolves: tdf#149408 inspector crash with a writer OLE inside calc toplevel isn't a SwDocShell at this point, its a ScDocShell Change-Id: I3aa3c72e494cf6c0ceff1286a7026ca01385ab8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135236 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx index 46b1486f5e57..b043852d309e 100644 --- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx +++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx @@ -64,7 +64,7 @@ WriterInspectorTextPanel::WriterInspectorTextPanel(weld::Widget* pParent) : InspectorTextPanel(pParent) , m_nParIdx(0) { - SwDocShell* pDocSh = static_cast<SwDocShell*>(SfxObjectShell::Current()); + SwDocShell* pDocSh = dynamic_cast<SwDocShell*>(SfxObjectShell::Current()); m_pShell = pDocSh ? pDocSh->GetWrtShell() : nullptr; if (m_pShell) { commit 7d8d65d850cdd0bdaa84e9cff9f8c1654c61ddb4 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Jun 1 10:34:07 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Jun 1 16:02:19 2022 +0200 The return value of XConnection::read is guaranteed to be non-negative ...so use o3tl::make_unsigned when comparing it against an expression of unsigned integer type, instead of casting that expression to a signed type Change-Id: Id2bea3010bf67bdaeb0766b20baecba195bf0181 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135227 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx index 7cabbd41c8a1..cbd18f1d8252 100644 --- a/binaryurp/source/reader.cxx +++ b/binaryurp/source/reader.cxx @@ -71,7 +71,7 @@ css::uno::Sequence< sal_Int8 > read( if (n == 0 && eofOk) { return css::uno::Sequence< sal_Int8 >(); } - if (n != static_cast< sal_Int32 >(size)) { + if (o3tl::make_unsigned(n) != size) { throw css::io::IOException( "binaryurp::Reader: premature end of input"); }