sc/source/ui/view/viewfun2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 12b89902036dba8d457c3e03080a4db50b99adcb
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Tue Sep 6 13:10:46 2022 +0200
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Tue Sep 6 15:09:16 2022 +0200

    Use of uninitialized bMatchedRangesWereClamped
    
    ...introduced in a740176009411d21e20d7c11097af1d8812d251d "tdf#150749 Find 
and
    replace on very large sheet", causing
    
    > sc/source/ui/view/viewfun2.cxx:2068:94: runtime error: load of value 52, 
which is not a valid value for type 'bool'
    >  #0 in ScViewFunc::SearchAndReplace(SvxSearchItem const*, bool, bool) at 
sc/source/ui/view/viewfun2.cxx:2068:94
    >  #1 in ScTabViewShell::ExecSearch(SfxRequest&) at 
sc/source/ui/view/tabvwshe.cxx:264:21
    >  #2 in SfxStubScTabViewShellExecSearch(SfxShell*, SfxRequest&) at 
workdir/SdiTarget/sc/sdi/scslots.hxx:1461:1
    >  #3 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, 
bool) at sfx2/source/control/dispatch.cxx:254:9
    >  #4 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, 
SfxCallMode) at sfx2/source/control/dispatch.cxx:753:9
    >  #5 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) 
at sfx2/source/control/bindings.cxx:1060:22
    >  #6 in SfxBindings::Execute_Impl(unsigned short, SfxPoolItem const**, 
unsigned short, SfxCallMode, SfxPoolItem const**, bool) at 
sfx2/source/control/bindings.cxx:964:5
    >  #7 in SfxBindings::ExecuteSynchron(unsigned short, SfxPoolItem const**) 
at sfx2/source/control/bindings.cxx:863:12
    >  #8 in SvxSearchDialog::CommandHdl_Impl(weld::Button&) at 
svx/source/dialog/srchdlg.cxx:1362:19
    >  #9 in SvxSearchDialog::LinkStubCommandHdl_Impl(void*, weld::Button&) at 
svx/source/dialog/srchdlg.cxx:1262:1
    
    during UITest_search_replace
    
    Change-Id: I05cd21ed881e120807f9859f6724c5023a96a989
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139488
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 6ed5394af2c6..44c84b8ebcd7 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2031,7 +2031,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* 
pSearchItem,
     {
         GetFrameWin()->EnterWait();
         ScRangeList aMatchedRanges;
-        bool bMatchedRangesWereClamped;
+        bool bMatchedRangesWereClamped = false;
         if (rDoc.SearchAndReplace(*pSearchItem, nCol, nRow, nTab, rMark, 
aMatchedRanges, aUndoStr, pUndoDoc.get(), bMatchedRangesWereClamped))
         {
             bFound = true;

Reply via email to