summaryrefslogtreecommitdiff
path: root/helpcontent2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-06-27 13:33:27 +0200
committerMichael Stahl <michael.stahl@cib.de>2019-12-23 10:57:36 +0100
commit3a57145a8c108d47eed711c9fdc473d00a283ec6 (patch)
tree6e6e37dcd3c9cfa3a066f5ee5be0c8cc6600487b /helpcontent2
parent3bab9a619cf6de58ce6eef211b1f7d3846993f82 (diff)
tdf#126127: Make nTmp smaller still, avoid -fsanitize=signed-integer-overflow
...after f2e3655255db4032738849cd4b77ce67a6e2c984 "Avoid -fsanitize=signed-integer-overflow" had already reduced it from using LONG_MAX to TWIPS_MAX/2 in the past. This time, avoid the computation of > const sal_uInt64 nCurrentDist = sal_Int64(aDiff.getX()) * sal_Int64(aDiff.getX()) + sal_Int64(aDiff.getY()) * sal_Int64(aDiff.getY()); // opt: no sqrt in GetFrameOfModify (sw/source/core/layout/frmtool.cxx) from overflowing (where aDiff.getY() derives from nTmp and can be close to it in magnitude, so computing its square would overflow on platforms where TWIPS_MAX is a large sal_Int64 value). (The "empirically shown to be large enough in practice" in the comment is a successful `make check` on Linux 64-bit with UBSan.) Change-Id: Ic7f058bd6853ff04ccb50a150509e98f850d12d2 Reviewed-on: https://gerrit.libreoffice.org/74801 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins (cherry picked from commit 8723ac4e20eda87a82393f2f6c7d28ece8514238) Reviewed-on: https://gerrit.libreoffice.org/85732
Diffstat (limited to 'helpcontent2')
0 files changed, 0 insertions, 0 deletions