[Libreoffice-commits] core.git: editeng/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 22 16:05:30 UTC 2021
editeng/source/items/borderline.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit cd468bdc757d310fb263749918dfd34e7c01b46c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 22 11:36:18 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 22 17:04:43 2021 +0100
cid#1474210 silence Untrusted divisor
m_nWidth is set to nOut + nIn + nDist so use that to better
show that there won't be a divide by zero m_nWidth
Change-Id: I67b56f5a55966c89e6edfab821f12852ceaa6f6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112885
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index 08261ed7165f..9037eeba9015 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -459,7 +459,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderLineStyle nStyle, sal_uInt16 nOut
// fdo#38542: not a known double, default to something custom...
SetBorderLineStyle(nStyle);
m_nWidth = nOut + nIn + nDist;
- if (nOut + nIn + nDist)
+ if (m_nWidth)
{
m_aWidthImpl = BorderWidthImpl(
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
More information about the Libreoffice-commits
mailing list