[Libreoffice-commits] core.git: sw/source
Stephan Bergmann
sbergman at redhat.com
Mon Dec 7 08:31:47 PST 2015
sw/source/core/text/frmform.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f2e3655255db4032738849cd4b77ce67a6e2c984
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Dec 7 17:27:28 2015 +0100
Avoid -fsanitize=signed-integer-overflow
...later on during loading of (a local copy of)
<https://wiki.documentfoundation.org/images/5/50/BH40-BaseHandbook.odt> at
> sw/inc/swrect.hxx:249:48: runtime error: signed integer overflow: 1080100 + 9223372036853697509 cannot be represented in type 'long'
> SwRect::Bottom() const sw/inc/swrect.hxx:249:48
> SwTextFly::CalcMinBottom() const sw/source/core/text/txtfly.cxx:996:31
> SwTextFly::GetMinBottom() const sw/source/core/inc/txtfly.hxx:339:45
> SwTextFormatter::CalcBottomLine() const sw/source/core/text/itrform2.cxx:1917:20
> SwTextFrame::FormatAdjust(SwTextFormatter&, WidowsAndOrphans&, int, bool) sw/source/core/text/frmform.cxx:1092:26
> SwTextFrame::_Format(SwTextFormatter&, SwTextFormatInfo&, bool) sw/source/core/text/frmform.cxx:1552:13
> SwTextFrame::_Format(OutputDevice*, SwParaPortion*) sw/source/core/text/frmform.cxx:1662:5
> SwTextFrame::Format(OutputDevice*, SwBorderAttrs const*) sw/source/core/text/frmform.cxx:1809:17
> SwContentFrame::MakeAll(OutputDevice*) sw/source/core/layout/calcmove.cxx:1391:17
> SwFrame::PrepareMake(OutputDevice*) sw/source/core/layout/calcmove.cxx:307:21
> SwFrame::Calc(OutputDevice*) const sw/source/core/layout/trvlfrm.cxx:1798:9
> SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs(SwTextFrame&) sw/source/core/layout/objectformattertxtfrm.cxx:753:9
> SwFlyAtContentFrame::MakeAll(OutputDevice*) sw/source/core/layout/flycnt.cxx:419:21
> SwFrame::PrepareMake(OutputDevice*) sw/source/core/layout/calcmove.cxx:341:5
> SwFlyFrame::Calc(OutputDevice*) const sw/source/core/layout/fly.cxx:2665:9
> SwLayAction::FormatLayoutFly(SwFlyFrame*) sw/source/core/layout/layact.cxx:1428:9
> SwObjectFormatter::_FormatObj(SwAnchoredObject&) sw/source/core/layout/objectformatter.cxx:331:17
> SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool) sw/source/core/layout/objectformattertxtfrm.cxx:134:9
> SwObjectFormatter::_FormatObjsAtFrame(SwTextFrame*) sw/source/core/layout/objectformatter.cxx:453:19
> SwObjectFormatterTextFrame::DoFormatObjs() sw/source/core/layout/objectformattertxtfrm.cxx:336:20
> SwObjectFormatter::FormatObjsAtFrame(SwFrame&, SwPageFrame const&, SwLayAction*) sw/source/core/layout/objectformatter.cxx:193:20
> SwLayAction::FormatContent(SwPageFrame const*) sw/source/core/layout/layact.cxx:1651:19
> SwLayAction::InternalAction(OutputDevice*) sw/source/core/layout/layact.cxx:572:31
> SwLayAction::Action(OutputDevice*) sw/source/core/layout/layact.cxx:352:5
> SwLayIdle::SwLayIdle(SwRootFrame*, SwViewShellImp*) sw/source/core/layout/layact.cxx:2159:13
> SwViewShell::LayoutIdle() sw/source/core/view/viewsh.cxx:728:19
> sw::DocumentTimerManager::DoIdleJobs(Idle*) sw/source/core/doc/DocumentTimerManager.cxx:119:17
> sw::DocumentTimerManager::LinkStubDoIdleJobs(void*, Idle*) sw/source/core/doc/DocumentTimerManager.cxx:81:1
> Link<Idle*, void>::Call(Idle*) const include/tools/link.hxx:84:45
> Idle::Invoke() vcl/source/app/idle.cxx:25:5
> ImplSchedulerData::Invoke() vcl/source/app/scheduler.cxx:40:5
> Scheduler::ProcessTaskScheduling(bool) vcl/source/app/scheduler.cxx:170:9
> ImplYield(bool, bool, unsigned long) vcl/source/app/svapp.cxx:519:5
> Application::Yield() vcl/source/app/svapp.cxx:535:5
> Application::Execute() vcl/source/app/svapp.cxx:471:9
> desktop::Desktop::DoExecute() desktop/source/app/app.cxx:1284:5
> desktop::Desktop::Main() desktop/source/app/app.cxx:1609:17
> ImplSVMain() vcl/source/app/svmain.cxx:170:19
> SVMain() vcl/source/app/svmain.cxx:207:16
> soffice_main desktop/source/app/sofficemain.cxx:96:12
> sal_main desktop/source/app/main.c:48:15
> main desktop/source/app/main.c:47
...whatever those hardcoded odd values used here, the code is the same ever
since 84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import"
Change-Id: I7f10034f97c52256d873b86a683c9204b944e704
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index ac8c9b4..3f1fb82 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -808,7 +808,7 @@ bool SwTextFrame::CalcPreps()
}
else
{
- SwTwips nTmp = LONG_MAX - (Frame().Top()+10000);
+ SwTwips nTmp = TWIPS_MAX/2 - (Frame().Top()+10000);
SwTwips nDiff = nTmp - Frame().Height();
Frame().Height( nTmp );
Prt().Height( Prt().Height() + nDiff );
More information about the Libreoffice-commits
mailing list