Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found
with Coverity Scan.
3 new defect(s) introduced to LibreOffice found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 1675090: Null pointer dereferences (FORWARD_NULL)
/xmloff/source/chart/SchXMLChartContext.cxx: 284 in
setDataProvider(const
com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> &, const
rtl::OUString &)()
_____________________________________________________________________________________________
*** CID 1675090: Null pointer dereferences (FORWARD_NULL)
/xmloff/source/chart/SchXMLChartContext.cxx: 284 in
setDataProvider(const
com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> &, const
rtl::OUString &)()
278 if (xProvider.is())
279 {
280 if (bHasDataPilotSource)
281 {
282
chart2api::AbstractPivotTableDataProvider* pPivotTableDataProvider =
283
dynamic_cast<chart2api::AbstractPivotTableDataProvider*>(xProvider.get());
>>> CID 1675090: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "pPivotTableDataProvider" to "setPivotTableName",
>>> which dereferences it. (The dereference happens because this is a virtual
>>> function call.)
284
pPivotTableDataProvider->setPivotTableName(sDataPilotSource);
285
xDataReceiver->attachDataProvider(xProvider);
286 bHasOwnData =
!pPivotTableDataProvider->hasPivotTable();
287 }
288 else
289 {
** CID 1675089: Uninitialized members (UNINIT_CTOR)
/sw/source/core/undo/untblk.cxx: 498 in
SwUndoCopyHeaderFooter::SwUndoCopyHeaderFooter(SwDoc &, SwNode &, const UIName
&)()
_____________________________________________________________________________________________
*** CID 1675089: Uninitialized members (UNINIT_CTOR)
/sw/source/core/undo/untblk.cxx: 498 in
SwUndoCopyHeaderFooter::SwUndoCopyHeaderFooter(SwDoc &, SwNode &, const UIName
&)()
492
493 SwUndoCopyHeaderFooter::SwUndoCopyHeaderFooter(SwDoc& rDoc, SwNode&
rSttNd, const UIName& rFmtName)
494 : SwUndo(SwUndoId::COPY_HEADER_FOOTER, rDoc)
495 , m_aOff(rSttNd.GetIndex())
496 , m_aFmtName(rFmtName)
497 {
>>> CID 1675089: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "m_bIsFirstLeft" is not initialized in this
>>> constructor nor in any functions that it calls.
498 }
499
500 static const SfxPoolItem* lcl_itemForFormat(SwFrameFormat& rFmt, bool
bIsHeader)
501 {
502 sal_uInt16 nAttr = bIsHeader ? sal_uInt16(RES_HEADER) :
sal_uInt16(RES_FOOTER);
503 const SfxPoolItem* pItem;
** CID 1675088: Performance inefficiencies (AUTO_CAUSES_COPY)
_____________________________________________________________________________________________
*** CID 1675088: Performance inefficiencies (AUTO_CAUSES_COPY)
/sw/source/core/undo/SwUndoPageDesc.cxx: 359 in
SwUndoPageDescDelete::SwUndoPageDescDelete(const SwPageDesc &, SwDoc &)()
353 SwDoc& rDoc)
354 : SwUndo(SwUndoId::DELETE_PAGEDESC, rDoc), m_aOld(_aOld, rDoc),
m_rDoc(rDoc)
355 {
356 // Record which page descriptions in this document used this page
desc as their follow
357 for (size_t i = 0; i < m_rDoc.GetPageDescCnt(); ++i)
358 {
>>> CID 1675088: Performance inefficiencies (AUTO_CAUSES_COPY)
>>> Using the "auto" keyword without an "&" causes the copy of an object of
>>> type "SwPageDesc", even if that object is not read.
359 if (const auto rPageDesc = m_rDoc.GetPageDesc(i);
rPageDesc.GetFollow() == &_aOld)
360 {
361 m_aPageDescsThisFollowed.emplace_back(rPageDesc.GetName());
362 }
363 }
364
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://scan.coverity.com/projects/libreoffice?tab=overview