New Defects reported by Coverity Scan for LibreOffice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
32 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1559993:    (DIVIDE_BY_ZERO)
/sw/source/ui/dialog/wordcountdialog.cxx: 73 in SwWordCountFloatDlg::SetValues(const SwDocStat &, const SwDocStat &)()
/sw/source/ui/dialog/wordcountdialog.cxx: 75 in SwWordCountFloatDlg::SetValues(const SwDocStat &, const SwDocStat &)()


________________________________________________________________________________________________________
*** CID 1559993:    (DIVIDE_BY_ZERO)
/sw/source/ui/dialog/wordcountdialog.cxx: 73 in SwWordCountFloatDlg::SetValues(const SwDocStat &, const SwDocStat &)()
67         setValue(*m_xDocCjkcharsFT, rDoc.nAsianWord, rLocaleData);
68         setValue(*m_xDocComments, rCurrent.nComments, rLocaleData);
69     
70         if (m_xStandardizedPagesLabelFT->get_visible())
71         {
72             sal_Int64 nCharsPerStandardizedPage = officecfg::Office::Writer::WordCount::StandardizedPageSize::get();
>>>     CID 1559993:    (DIVIDE_BY_ZERO)
>>>     In expression "static_cast<double>(rCurrent.nChar) / nCharsPerStandardizedPage", division by expression "nCharsPerStandardizedPage" which may be zero has undefined behavior.
73             setDoubleValue(*m_xCurrentStandardizedPagesFT,
74                 static_cast<double>(rCurrent.nChar) / nCharsPerStandardizedPage);
75             setDoubleValue(*m_xDocStandardizedPagesFT,
76                 static_cast<double>(rDoc.nChar) / nCharsPerStandardizedPage);
77         }
78     
/sw/source/ui/dialog/wordcountdialog.cxx: 75 in SwWordCountFloatDlg::SetValues(const SwDocStat &, const SwDocStat &)()
69     
70         if (m_xStandardizedPagesLabelFT->get_visible())
71         {
72             sal_Int64 nCharsPerStandardizedPage = officecfg::Office::Writer::WordCount::StandardizedPageSize::get();
73             setDoubleValue(*m_xCurrentStandardizedPagesFT,
74                 static_cast<double>(rCurrent.nChar) / nCharsPerStandardizedPage);
>>>     CID 1559993:    (DIVIDE_BY_ZERO)
>>>     In expression "static_cast<double>(rDoc.nChar) / nCharsPerStandardizedPage", division by expression "nCharsPerStandardizedPage" which may be zero has undefined behavior.
75             setDoubleValue(*m_xDocStandardizedPagesFT,
76                 static_cast<double>(rDoc.nChar) / nCharsPerStandardizedPage);
77         }
78     
79         bool bShowCJK = (SvtCJKOptions::IsAnyEnabled() || rDoc.nAsianWord);
80         bool bToggleCJK = m_xCurrentCjkcharsFT->get_visible() != bShowCJK;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DO6zB_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJigysQen5OMfnry610iZ10vzbkx1obUyWBwekGKbjMuStv74Cl-2B6kiQvtj68-2F6eJKhc1RzQ2b47pSEKGRPx3z-2Fn5Opuu3pN5YFr5FgMl2tpxx5YjNYIm1I0IBPPViZyKyI-2FXdttgv19DYUIS8VhklVNYB30oc1qKEDoO1lafgp5xU-3D




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux