New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Fri Jul 16 20:07:17 UTC 2021
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.
1 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 1487495: Integer handling issues (DIVIDE_BY_ZERO)
/sc/source/core/tool/interpr1.cxx: 2377 in ScInterpreter::ScCell()()
________________________________________________________________________________________________________
*** CID 1487495: Integer handling issues (DIVIDE_BY_ZERO)
/sc/source/core/tool/interpr1.cxx: 2377 in ScInterpreter::ScCell()()
2371 // font color doesn't matter here
2372 mrDoc.GetDefPattern()->GetFont( aDefFont, SC_AUTOCOL_BLACK, pPrinter );
2373 pPrinter->SetFont( aDefFont );
2374 tools::Long nZeroWidth = pPrinter->GetTextWidth( OUString( '0' ) );
2375 pPrinter->SetFont( aOldFont );
2376 pPrinter->SetMapMode( aOldMode );
>>> CID 1487495: Integer handling issues (DIVIDE_BY_ZERO)
>>> In expression "this->mrDoc->GetColWidth(aCellPos.Col(), aCellPos.Tab(), true) / nZeroWidth", division by expression "nZeroWidth" which may be zero has undefined behavior.
2377 int nZeroCount = static_cast<int>(mrDoc.GetColWidth( aCellPos.Col(), aCellPos.Tab() ) / nZeroWidth);
2378 PushInt( nZeroCount );
2379 }
2380 else if( aInfoType == "PREFIX" )
2381 { // ' = left; " = right; ^ = centered
2382 sal_Unicode c = 0;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D8oHc_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJil84TeszvTF-2BATNMNWQLWahJNDrIgOft5H368nfftwb99KxSaEQkey-2BdrK5HEs1Gw2Uh-2FvM-2BMibr3Z0fLZbC7x9rrJprSsvirXgMiCYfUKdMWQ1FyOKZiUKyR9-2BB9MfZHz5Tkdu5Qdp9jwsZ-2Fy5TgY0e8yeJbLRSQVhXty56PGeA-3D
More information about the LibreOffice
mailing list