sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 11 ++++++----- svl/source/items/itemset.cxx | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-)
New commits: commit 2da65b3c04e35a293cd2e630ffd9bc24b3453814 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Jan 13 19:01:42 2024 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Jan 13 22:08:50 2024 +0100 cid#1585309 Dereference before null check Change-Id: I49ab7a48e74055264037d6930692fdae8be6d3ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162022 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 41051a981aa4..673cbea84c50 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -329,7 +329,7 @@ SfxPoolItem const* implCreateItemEntry(SfxItemPool& rPool, SfxPoolItem const* pS SfxItemPool* pMasterPool(rPool.GetMasterPool()); assert(nullptr != pMasterPool); SfxItemPool* pTargetPool(pMasterPool); - while (!pTargetPool->IsInRange(nWhich)) + while (pTargetPool && !pTargetPool->IsInRange(nWhich)) pTargetPool = pTargetPool->GetSecondaryPool(); // if this goes wrong, an Item with invalid ID for this pool is commit 49cc32842a039ab6b8e180df5b24ae8a5b1bd27b Author: Caolán McNamara <[email protected]> AuthorDate: Sat Jan 13 18:59:32 2024 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Jan 13 22:08:38 2024 +0100 cid#1585306 Uninitialized scalar field Change-Id: I3fa54356865f7f0cf322745c254eeb0867e6f422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162021 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index d14dd1cb08c0..31eb73b0a8e5 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -216,11 +216,12 @@ void ScZoomSliderWnd::dispose() ScZoomSlider::ScZoomSlider(css::uno::Reference< css::frame::XDispatchProvider> xDispatchProvider, sal_uInt16 nCurrentZoom) - : mnCurrentZoom( nCurrentZoom ), - mnMinZoom( 10 ), - mnMaxZoom( 400 ), - mbOmitPaint( false ), - m_xDispatchProvider(std::move(xDispatchProvider)) + : mnSliderLength(0) + , mnCurrentZoom(nCurrentZoom) + , mnMinZoom(10) + , mnMaxZoom(400) + , mbOmitPaint(false) + , m_xDispatchProvider(std::move(xDispatchProvider)) { maSliderButton = Image(StockImage::Yes, RID_SVXBMP_SLIDERBUTTON); maIncreaseButton = Image(StockImage::Yes, RID_SVXBMP_SLIDERINCREASE);
