diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-10-09 16:05:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-10-09 16:20:30 +0200 |
commit | a636d2ee19fcb319b028e04395c2eee0f624263c (patch) | |
tree | 1bb0b5bb572a65ee1fb897377a0e0fcc47a0dce5 /sw | |
parent | c2c3a82b2c1a7de4ea050e57c3b762059f8aee17 (diff) |
Revert "Revert "Fix -fsanitize=signed-integer-overflow""
This reverts commit ce057e662b2e10e111353e9461c3c01434ddbb0f; the original
63d845dc88690b9c5c8194e1512a8e4390c7ee24 appears to be useful after all to make
UBSan 'instdir/program/soffice sw/qa/extras/uiwriter/data/tdf112860.fodt'
succeed after 'make -O -j12 ExternalPackage_fonts_liberation.clean', see
tdf#112942.
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/newfrm.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 51e25db4f792..cb11e045f5ad 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <o3tl/safeint.hxx> #include <svx/svdmodel.hxx> #include <svx/svdpage.hxx> #include <drawdoc.hxx> @@ -104,7 +107,7 @@ static SwRectFnCollection aHorizontal = { &FirstMinusSecond, &FirstMinusSecond, &SwIncrement, - &SwIncrement, + &o3tl::saturating_add<long>, &SwRect::SetLeftAndWidth, &SwRect::SetTopAndHeight }; |