New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Tue Feb 18 04:10:26 UTC 2025
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
7 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 7 of 7 defect(s)
** CID 1642994: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/sfx2/source/appl/appmisc.cxx: 150 in SfxApplication::loadBrandSvg(const char *, BitmapEx &, int)()
________________________________________________________________________________________________________
*** CID 1642994: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/sfx2/source/appl/appmisc.cxx: 150 in SfxApplication::loadBrandSvg(const char *, BitmapEx &, int)()
144 return false;
145
146 BinaryDataContainer aDataContainer(aStream, aStream.remainingSize());
147 if (aStream.GetError())
148 return false;
149
>>> CID 1642994: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "aDataContainer" is passed-by-value as parameter to "VectorGraphicData::VectorGraphicData(BinaryDataContainer, VectorGraphicDataType, sal_Int32)" when it could be moved instead.
150 VectorGraphicData aVectorGraphicData(aDataContainer, VectorGraphicDataType::Svg);
151
152 // transform into [0,0,width,width*aspect] std dimensions
153
154 basegfx::B2DRange aRange(aVectorGraphicData.getRange());
155 const double fAspectRatio(
** CID 1642993: Memory - illegal accesses (UNINIT)
________________________________________________________________________________________________________
*** CID 1642993: Memory - illegal accesses (UNINIT)
/ucb/source/ucp/webdav-curl/SerfLockStore.cxx: 285 in http_dav_ucp::SerfLockStore::refreshLocks(std::unique_lock<std::mutex> &)()
279 }
280 }
281 }
282
283 for (auto const& rLock : authFailedLocks)
284 {
>>> CID 1642993: Memory - illegal accesses (UNINIT)
>>> Using uninitialized value "aGuard._M_owns" when calling "removeLockImpl".
285 removeLockImpl(aGuard, rLock);
286 }
287
288 return min_remaining;
289 }
290
** CID 1642992: Uninitialized variables (UNINIT)
________________________________________________________________________________________________________
*** CID 1642992: Uninitialized variables (UNINIT)
/ucb/source/ucp/webdav-curl/SerfLockStore.cxx: 68 in http_dav_ucp::TickerThread::execute()()
62 SAL_INFO("ucb.ucp.webdav", "TickerThread: start.");
63
64 std::unique_lock aGuard(m_rLockStore.m_aMutex);
65
66 while (!m_bFinish)
67 {
>>> CID 1642992: Uninitialized variables (UNINIT)
>>> Using uninitialized value "aGuard._M_owns" when calling "refreshLocks".
68 auto sleep_duration = m_rLockStore.refreshLocks(aGuard);
69
70 if (sleep_duration == std::chrono::milliseconds::max())
71 {
72 // Wait until a lock is added or shutdown
73 m_rLockStore.m_aCondition.wait(
** CID 1642991: Integer handling issues (INTEGER_OVERFLOW)
/sc/source/core/tool/interpr5.cxx: 1155 in ScInterpreter::ScMatSequence()()
________________________________________________________________________________________________________
*** CID 1642991: Integer handling issues (INTEGER_OVERFLOW)
/sc/source/core/tool/interpr5.cxx: 1155 in ScInterpreter::ScMatSequence()()
1149 if (nGlobalError != FormulaError::NONE)
1150 {
1151 PushError(nGlobalError);
1152 return;
1153 }
1154
>>> CID 1642991: Integer handling issues (INTEGER_OVERFLOW)
>>> Expression "nColumns * nRows", which is equal to 1, where "nColumns" is known to be equal to 2147483647, and "nRows" is known to be equal to 2147483647, overflows the type that receives it, a signed integer 32 bits wide.
1155 size_t nMatrixSize = nColumns * nRows;
1156 ScMatrixRef pResMat = GetNewMat(nColumns, nRows, /*bEmpty*/true);
1157 for (size_t iPos = 0; iPos < nMatrixSize; iPos++)
1158 {
1159 pResMat->PutDoubleTrans(nStart, iPos);
1160 nStart = nStart + nSteps;
** CID 1642990: Incorrect expression (USELESS_CALL)
________________________________________________________________________________________________________
*** CID 1642990: Incorrect expression (USELESS_CALL)
/sc/source/ui/navipi/navipi.cxx: 103 in <unnamed>::AlphaToNum(const ScDocument &, const rtl::OUString &)()
97 ++nColumn;
98
99 if ( (aUpperCaseStr.getLength() > SCNAV_COLLETTERS(rDoc.GetSheetLimits())) ||
100 (nColumn > SCNAV_MAXCOL(rDoc.GetSheetLimits())) )
101 {
102 nColumn = SCNAV_MAXCOL(rDoc.GetSheetLimits());
>>> CID 1642990: Incorrect expression (USELESS_CALL)
>>> Calling "<unnamed>::NumToAlpha(rDoc->GetSheetLimits(), nColumn)" is only useful for its return value, which is ignored.
103 NumToAlpha( rDoc.GetSheetLimits(), nColumn);
104 }
105 }
106
107 return nColumn;
108 }
** CID 1642989: Program hangs (LOCK)
________________________________________________________________________________________________________
*** CID 1642989: Program hangs (LOCK)
/ucb/source/ucp/webdav-curl/SerfLockStore.cxx: 68 in http_dav_ucp::TickerThread::execute()()
62 SAL_INFO("ucb.ucp.webdav", "TickerThread: start.");
63
64 std::unique_lock aGuard(m_rLockStore.m_aMutex);
65
66 while (!m_bFinish)
67 {
>>> CID 1642989: Program hangs (LOCK)
>>> "refreshLocks" locks "this->m_rLockStore.m_aMutex" while it is locked.
68 auto sleep_duration = m_rLockStore.refreshLocks(aGuard);
69
70 if (sleep_duration == std::chrono::milliseconds::max())
71 {
72 // Wait until a lock is added or shutdown
73 m_rLockStore.m_aCondition.wait(
** CID 1642988: Uninitialized members (UNINIT_CTOR)
/vcl/source/control/slider.cxx: 63 in Slider::Slider(vcl::Window *, long)()
________________________________________________________________________________________________________
*** CID 1642988: Uninitialized members (UNINIT_CTOR)
/vcl/source/control/slider.cxx: 63 in Slider::Slider(vcl::Window *, long)()
57 mbCalcSize = true;
58
59 Control::ImplInit( pParent, nStyle, nullptr );
60
61 ImplInitSettings();
62 SetSizePixel( CalcWindowSizePixel() );
>>> CID 1642988: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "mnMouseOff" is not initialized in this constructor nor in any functions that it calls.
63 }
64
65 Slider::~Slider()
66 {
67 disposeOnce();
68 }
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libreoffice?tab=overview
More information about the LibreOffice
mailing list