Kaydet (Commit) 6906f659 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix -fsanitize=signed-integer-overflow (when long int is 32-bit)

Change-Id: I25a96479eafa97eccace2879bf8e1af5e85f60c8
üst 59eac78f
......@@ -3301,7 +3301,7 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1
// Point not in rectangle. Compare distances:
const Point aCalcRectCenter = aCalcRect.Center();
const Point aDiff = aCalcRectCenter - *pPoint;
const sal_uInt64 nCurrentDist = aDiff.getX() * aDiff.getX() + aDiff.getY() * aDiff.getY(); // opt: no sqrt
const sal_uInt64 nCurrentDist = sal_Int64(aDiff.getX()) * sal_Int64(aDiff.getX()) + sal_Int64(aDiff.getY()) * sal_Int64(aDiff.getY()); // opt: no sqrt
if ( !pMinFrm || nCurrentDist < nMinDist )
{
pMinFrm = pTmpFrm;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment