vcl/source/gdi/print.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit acce5d17ac7f5d8c92e5f75a5757ac449692e2fa
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Thu Feb 29 08:10:40 2024 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Thu Feb 29 10:03:27 2024 +0100

    Read of uninitialized Printer::mbResetPrintArea
    
    ...introduced in 364f0bb1cac0e12f5f926857f61c2f329a353ec7 "tdf#155218 sc: 
fix
    regression page orientation in print dialog", causing UITest_calc_dialogs to
    fail with
    
    > /include/vcl/print.hxx:227:61: runtime error: load of value 190, which is 
not a valid value for type 'bool'
    >     #0 0x7f1337c5ec9e in Printer::IsPrintAreaReset() 
/include/vcl/print.hxx:227:61
    >     #1 0x7f1337bd64be in 
ScModelObj::getRendererCount(com::sun::star::uno::Any const&, 
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) 
/sc/source/ui/unoobj/docuno.cxx:1856:41
    >     #2 0x7f13ca466d5f in SfxPrinterController::getPageCount() const 
/sfx2/source/view/viewprn.cxx:228:36
    >     #3 0x7f13a130580e in 
Printer::PreparePrintJob(std::shared_ptr<vcl::PrinterController>, JobSetup 
const&) /vcl/source/gdi/print3.cxx:420:53
    >     #4 0x7f13a13027e3 in 
Printer::ImplPrintJob(std::shared_ptr<vcl::PrinterController> const&, JobSetup 
const&) /vcl/source/gdi/print3.cxx:575:9
    >     #5 0x7f13a134cdc8 in (anonymous 
namespace)::PrintJobAsync::ExecJob(void*) /vcl/source/gdi/print3.cxx:318:5
    >     #6 0x7f13a1302b28 in (anonymous 
namespace)::PrintJobAsync::LinkStubExecJob(void*, void*) 
/vcl/source/gdi/print3.cxx:316:1
    >     #7 0x7f139f592d0d in Link<void*, void>::Call(void*) const 
/include/tools/link.hxx:111:45
    >     #8 0x7f139f579a00 in ImplHandleUserEvent(ImplSVEvent*) 
/vcl/source/window/winproc.cxx:2287:30
    >     #9 0x7f139f5646c0 in ImplWindowFrameProc(vcl::Window*, SalEvent, void 
const*) /vcl/source/window/winproc.cxx:2851:13
    >     #10 0x7f13a3273a82 in SalFrame::CallCallback(SalEvent, void const*) 
const /vcl/inc/salframe.hxx:310:29
    >     #11 0x7f13a3320ea1 in 
SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) 
/vcl/headless/svpinst.cxx:266:22
    >     #12 0x7f13a3321632 in non-virtual thunk to 
SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) 
/vcl/headless/svpinst.cxx
    >     #13 0x7f13a1b7e593 in 
SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const 
/vcl/source/app/salusereventlist.cxx:119:58
    >     #14 0x7f13a1b7dd25 in SalUserEventList::DispatchUserEvents(bool) 
/vcl/source/app/salusereventlist.cxx:120:13
    >     #15 0x7f13a3325345 in SvpSalInstance::ImplYield(bool, bool) 
/vcl/headless/svpinst.cxx:395:22
    >     #16 0x7f13a3327b4e in SvpSalInstance::DoYield(bool, bool) 
/vcl/headless/svpinst.cxx:471:21
    >     #17 0x7f13a2012c4a in ImplYield(bool, bool) 
/vcl/source/app/svapp.cxx:390:48
    >     #18 0x7f13a20112b8 in Application::Yield() 
/vcl/source/app/svapp.cxx:474:5
    >     #19 0x7f13a2010b57 in Application::Execute() 
/vcl/source/app/svapp.cxx:368:13
    >     #20 0x7f13e355d421 in desktop::Desktop::Main() 
/desktop/source/app/app.cxx:1614:13
    >     #21 0x7f13a20b6ae2 in ImplSVMain() /vcl/source/app/svmain.cxx:229:35
    >     #22 0x7f13a20bfd20 in SVMain() /vcl/source/app/svmain.cxx:261:12
    >     #23 0x7f13e376dc40 in soffice_main 
/desktop/source/app/sofficemain.cxx:94:12
    >     #24 0x4fda3c in sal_main /desktop/source/app/main.c:51:15
    
    (<https://ci.libreoffice.org/job/lo_ubsan/3090/>)
    
    Change-Id: Ibf9ed98b133337457e983155b960dfc40f84c819
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164135
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 3697e51c338d..42013175e131 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -450,6 +450,7 @@ void Printer::ImplInitData()
     mbNewJobSetup       = false;
     mbSinglePrintJobs   = false;
     mbUsePrintSetting   = false;
+    mbResetPrintArea    = false;
     mpInfoPrinter       = nullptr;
     mpPrinter           = nullptr;
     mpDisplayDev        = nullptr;

Reply via email to