editeng/source/items/borderline.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cd468bdc757d310fb263749918dfd34e7c01b46c
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Mar 22 11:36:18 2021 +0000
Commit:     Caolán McNamara <caol...@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 <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@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,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to