New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Wed Jul 14 12:52:08 UTC 2021
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
4 new defect(s) introduced to LibreOffice found with Coverity Scan.
6 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 4 of 4 defect(s)
** CID 1487479: Integer handling issues (DIVIDE_BY_ZERO)
________________________________________________________________________________________________________
*** CID 1487479: Integer handling issues (DIVIDE_BY_ZERO)
/svx/source/svdraw/svdopath.cxx: 2395 in SdrPathObj::NbcSetSnapRect(const tools::Rectangle &)()
2389 if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
2390 if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
2391 if ( nDivX == nMulX ) { nMulX = 1; nDivX = 1; }
2392 if ( nDivY == nMulY ) { nMulY = 1; nDivY = 1; }
2393 Fraction aX(nMulX,nDivX);
2394 Fraction aY(nMulY,nDivY);
>>> CID 1487479: Integer handling issues (DIVIDE_BY_ZERO)
>>> In function call "NbcResize", modulo by expression "aX.mnNumerator" which may be zero has undefined behavior.
2395 NbcResize(aOld.TopLeft(), aX, aY);
2396 NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
2397 }
2398
2399 sal_uInt32 SdrPathObj::GetSnapPointCount() const
2400 {
** CID 1487478: Integer handling issues (DIVIDE_BY_ZERO)
________________________________________________________________________________________________________
*** CID 1487478: Integer handling issues (DIVIDE_BY_ZERO)
/svx/source/svdraw/svdopath.cxx: 2395 in SdrPathObj::NbcSetSnapRect(const tools::Rectangle &)()
2389 if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
2390 if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
2391 if ( nDivX == nMulX ) { nMulX = 1; nDivX = 1; }
2392 if ( nDivY == nMulY ) { nMulY = 1; nDivY = 1; }
2393 Fraction aX(nMulX,nDivX);
2394 Fraction aY(nMulY,nDivY);
>>> CID 1487478: Integer handling issues (DIVIDE_BY_ZERO)
>>> In function call "NbcResize", modulo by expression "aY.mnNumerator" which may be zero has undefined behavior.
2395 NbcResize(aOld.TopLeft(), aX, aY);
2396 NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
2397 }
2398
2399 sal_uInt32 SdrPathObj::GetSnapPointCount() const
2400 {
** CID 1475942: Uninitialized members (UNINIT_CTOR)
/usr/include/c++/9/bits/random.h: 2010 in std::normal_distribution<double>::normal_distribution()()
________________________________________________________________________________________________________
*** CID 1475942: Uninitialized members (UNINIT_CTOR)
/usr/include/c++/9/bits/random.h: 2010 in std::normal_distribution<double>::normal_distribution()()
2004 private:
2005 _RealType _M_mean;
2006 _RealType _M_stddev;
2007 };
2008
2009 public:
>>> CID 1475942: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "_M_saved" is not initialized in this constructor nor in any functions that it calls.
2010 normal_distribution() : normal_distribution(0.0) { }
2011
2012 /**
2013 * Constructs a normal distribution with parameters @f$mean at f$ and
2014 * standard deviation.
2015 */
** CID 257629: (MISSING_BREAK)
/workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx: 4451 in yytnamerr(char *, const char *)()
/workdir/YaccTarget/idlc/source/parser.cxx: 1473 in yytnamerr(char *, const char *)()
________________________________________________________________________________________________________
*** CID 257629: (MISSING_BREAK)
/workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx: 4451 in yytnamerr(char *, const char *)()
4445 switch (*++yyp)
4446 {
4447 case '\'':
4448 case ',':
4449 goto do_not_strip_quotes;
4450
>>> CID 257629: (MISSING_BREAK)
>>> The case for value "'\\'" is not terminated by a "break" statement.
4451 case '\\':
4452 if (*++yyp != '\\')
4453 goto do_not_strip_quotes;
4454 else
4455 goto append;
4456
/workdir/YaccTarget/idlc/source/parser.cxx: 1473 in yytnamerr(char *, const char *)()
1467 switch (*++yyp)
1468 {
1469 case '\'':
1470 case ',':
1471 goto do_not_strip_quotes;
1472
>>> CID 257629: (MISSING_BREAK)
>>> The case for value "'\\'" is not terminated by a "break" statement.
1473 case '\\':
1474 if (*++yyp != '\\')
1475 goto do_not_strip_quotes;
1476 else
1477 goto append;
1478
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3Db2GB_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiP3LuRy2nZJVkPQmm3MOP0WUu8HsvGlSYbCxO6ACjMraXha6tiWlWxcS7ZgCPti-2B1rnIJpdcYCyy0PHkm4ZDUrLkx5w85c86NgE3KHJL6HZHwlBxhaErLGPc6-2Bz9gQDk27MPO9-2BoTBKmtr21YX-2BCWKayJOmuJwAIXkC4m4kKpWT5PDORk5FVCzXJn1v9DZS9t
More information about the LibreOffice
mailing list