Hi,

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

6 new defect(s) introduced to LibreOffice found with Coverity Scan.
7 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 6 of 6 defect(s)


** CID 1645559:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/view/viewfun5.cxx: 745 in 
ScViewFunc::PasteDataFormatFormattedText(SotClipboardFormatId, const 
com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, 
short, int, bool, const TransferableDataHelper &, bool)::[lambda(int) (instance 
1)]::lambda([lambda(int) (instance 1)]&&)()


________________________________________________________________________________________________________
*** CID 1645559:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/view/viewfun5.cxx: 745 in 
ScViewFunc::PasteDataFormatFormattedText(SotClipboardFormatId, const 
com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, 
short, int, bool, const TransferableDataHelper &, bool)::[lambda(int) (instance 
1)]::lambda([lambda(int) (instance 1)]&&)()
739                 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
740                 VclPtr<AbstractScImportAsciiDlg> pDlg(
741                     pFact->CreateScImportAsciiDlg(pParent ? 
pParent->GetFrameWeld() : nullptr, OUString(), pStrm.get(), SC_PASTETEXT));
742     
743                 bAllowDialogs = bAllowDialogs && 
!ScModule::get()->IsInExecuteDrop();
744     
>>>     CID 1645559:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
745                 pDlg->StartExecuteAsync([this, pDlg, &rDoc, 
pStrm=std::move(pStrm),
746                                          nFormatId, 
pStrBuffer=std::move(pStrBuffer),
747                                          pObj=std::move(pObj), 
bAllowDialogs](sal_Int32 nResult){
748                     bool bShowErrorDialog = bAllowDialogs;
749                     if (RET_OK == nResult)
750                     {

** CID 1645558:    (INTEGER_OVERFLOW)
/sw/source/core/doc/docnum.cxx: 479 in SwDoc::MoveOutlinePara(const SwPaM &, 
long, const SwOutlineNodesInline *)()
/sw/source/core/doc/docnum.cxx: 492 in SwDoc::MoveOutlinePara(const SwPaM &, 
long, const SwOutlineNodesInline *)()


________________________________________________________________________________________________________
*** CID 1645558:    (INTEGER_OVERFLOW)
/sw/source/core/doc/docnum.cxx: 479 in SwDoc::MoveOutlinePara(const SwPaM &, 
long, const SwOutlineNodesInline *)()
473         SwNode* pEndSrch = &aEndRg.GetNode();
474     
475         if( !pOutlineNodesInline && !GetNodes().GetOutLineNds().Seek_Entry( 
pSrch, &nCurrentPos ) )
476         {
477             if( !nCurrentPos )
478                 return false; // Promoting or demoting before the first 
outline => no.
>>>     CID 1645558:    (INTEGER_OVERFLOW)
>>>     Expression "--nCurrentPos", which is equal to 18446744073709551615, 
>>> where "nCurrentPos" is known to be equal to 0, underflows the type that 
>>> receives it, an unsigned integer 64 bits wide.
479             if( --nCurrentPos )
480                 aSttRg = *GetNodes().GetOutLineNds()[ nCurrentPos ];
481             else if( 0 > nOffset )
482                 return false; // Promoting at the top of document?!
483             else
484                 aSttRg = *GetNodes().GetEndOfContent().StartOfSectionNode();
/sw/source/core/doc/docnum.cxx: 492 in SwDoc::MoveOutlinePara(const SwPaM &, 
long, const SwOutlineNodesInline *)()
486         else if ( pOutlineNodesInline )
487         {
488             if ( !pOutlineNodesInline->Seek_Entry_By_Anchor(pSrch, 
&nCurrentPosInline) )
489             {
490                 if( !nCurrentPosInline )
491                     return false; // Promoting or demoting before the first 
outline => no.
>>>     CID 1645558:    (INTEGER_OVERFLOW)
>>>     Expression "--nCurrentPosInline", which is equal to 
>>> 18446744073709551615, where "nCurrentPosInline" is known to be equal to 0, 
>>> underflows the type that receives it, an unsigned integer 64 bits wide.
492                 if( --nCurrentPosInline )
493                 {
494                     aSttRg = 
*SwOutlineNodes::GetRootNode((*pOutlineNodesInline)[ nCurrentPosInline ]);
495                 }
496                 else if( 0 > nOffset )
497                     return false; // Promoting at the top of document?!

** CID 1645557:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1645557:  Null pointer dereferences  (NULL_RETURNS)
/sc/source/ui/docshell/docsh4.cxx: 1369 in ScDocShell::Execute(SfxRequest &)()
1363                 PostPaintGridAll();
1364             }
1365             break;
1366             case SID_PROTECTPOS:
1367             case SID_PROTECTSIZE:
1368             {
>>>     CID 1645557:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "nullptr" 
>>> "this->GetBestViewShell(true)->GetViewData()" when calling "GetScDrawView".
1369                 ScDrawView* pScDrawView = 
GetBestViewShell()->GetViewData().GetScDrawView();
1370                 if (!pScDrawView)
1371                     return;
1372     
1373                 const SdrMarkList& rMarkList = 
pScDrawView->GetMarkedObjectList();
1374                 assert ( rMarkList.GetMarkCount() == 1 );

** CID 1645556:    (UNINIT)


________________________________________________________________________________________________________
*** CID 1645556:    (UNINIT)
/sw/source/core/unocore/unochart.cxx: 168 in LaunchModifiedEvent(const 
comphelper::OInterfaceContainerHelper4<com::sun::star::util::XModifyListener> 
&, const com::sun::star::uno::Reference<com::sun::star::uno::XInterface> &)()
162     static void LaunchModifiedEvent(
163             const 
::comphelper::OInterfaceContainerHelper4<util::XModifyListener> &rICH,
164             const uno::Reference< uno::XInterface > &rxI )
165     {
166         lang::EventObject aEvtObj( rxI );
167         std::unique_lock aGuard(GetChartMutex());
>>>     CID 1645556:    (UNINIT)
>>>     Using uninitialized value "aGuard._M_owns" when calling "notifyEach".
168         rICH.notifyEach( aGuard, &util::XModifyListener::modified, aEvtObj 
);
169     }
170     
171     /**
172      * rCellRangeName needs to be of one of the following formats:
173      * - e.g. "A2:E5" or
/sw/source/core/unocore/unochart.cxx: 168 in LaunchModifiedEvent(const 
comphelper::OInterfaceContainerHelper4<com::sun::star::util::XModifyListener> 
&, const com::sun::star::uno::Reference<com::sun::star::uno::XInterface> &)()
162     static void LaunchModifiedEvent(
163             const 
::comphelper::OInterfaceContainerHelper4<util::XModifyListener> &rICH,
164             const uno::Reference< uno::XInterface > &rxI )
165     {
166         lang::EventObject aEvtObj( rxI );
167         std::unique_lock aGuard(GetChartMutex());
>>>     CID 1645556:    (UNINIT)
>>>     Using uninitialized value "aGuard._M_device" when calling "notifyEach".
168         rICH.notifyEach( aGuard, &util::XModifyListener::modified, aEvtObj 
);
169     }
170     
171     /**
172      * rCellRangeName needs to be of one of the following formats:
173      * - e.g. "A2:E5" or

** CID 1645555:    (UNINIT)


________________________________________________________________________________________________________
*** CID 1645555:    (UNINIT)
/sw/source/core/unocore/unotbl.cxx: 172 in 
<unnamed>::lcl_SendChartEvent(std::mutex &, const 
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> &, const 
comphelper::OInterfaceContainerHelper4<com::sun::star::chart::XChartDataChangeEventListener>
 &)()
166     
167         void lcl_SendChartEvent(std::mutex& rMutex,
168                 uno::Reference<uno::XInterface> const& xSource,
169                 const 
::comphelper::OInterfaceContainerHelper4<chart::XChartDataChangeEventListener> 
& rListeners)
170         {
171             std::unique_lock aGuard(rMutex);
>>>     CID 1645555:    (UNINIT)
>>>     Using uninitialized value "aGuard._M_device" when calling 
>>> "lcl_SendChartEvent".
172             lcl_SendChartEvent(aGuard, xSource, rListeners);
173         }
174     }
175     
176     #define UNO_TABLE_COLUMN_SUM 10000
177     
/sw/source/core/unocore/unotbl.cxx: 172 in 
<unnamed>::lcl_SendChartEvent(std::mutex &, const 
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> &, const 
comphelper::OInterfaceContainerHelper4<com::sun::star::chart::XChartDataChangeEventListener>
 &)()
166     
167         void lcl_SendChartEvent(std::mutex& rMutex,
168                 uno::Reference<uno::XInterface> const& xSource,
169                 const 
::comphelper::OInterfaceContainerHelper4<chart::XChartDataChangeEventListener> 
& rListeners)
170         {
171             std::unique_lock aGuard(rMutex);
>>>     CID 1645555:    (UNINIT)
>>>     Using uninitialized value "aGuard._M_owns" when calling 
>>> "lcl_SendChartEvent".
172             lcl_SendChartEvent(aGuard, xSource, rListeners);
173         }
174     }
175     
176     #define UNO_TABLE_COLUMN_SUM 10000
177     

** CID 1645554:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/view/viewfun5.cxx: 745 in 
ScViewFunc::PasteDataFormatFormattedText(SotClipboardFormatId, const 
com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, 
short, int, bool, const TransferableDataHelper &, bool)::[lambda(int) (instance 
1)]::lambda(const [lambda(int) (instance 1)]&)()


________________________________________________________________________________________________________
*** CID 1645554:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/view/viewfun5.cxx: 745 in 
ScViewFunc::PasteDataFormatFormattedText(SotClipboardFormatId, const 
com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> &, 
short, int, bool, const TransferableDataHelper &, bool)::[lambda(int) (instance 
1)]::lambda(const [lambda(int) (instance 1)]&)()
739                 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
740                 VclPtr<AbstractScImportAsciiDlg> pDlg(
741                     pFact->CreateScImportAsciiDlg(pParent ? 
pParent->GetFrameWeld() : nullptr, OUString(), pStrm.get(), SC_PASTETEXT));
742     
743                 bAllowDialogs = bAllowDialogs && 
!ScModule::get()->IsInExecuteDrop();
744     
>>>     CID 1645554:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
745                 pDlg->StartExecuteAsync([this, pDlg, &rDoc, 
pStrm=std::move(pStrm),
746                                          nFormatId, 
pStrBuffer=std::move(pStrBuffer),
747                                          pObj=std::move(pObj), 
bAllowDialogs](sal_Int32 nResult){
748                     bool bShowErrorDialog = bAllowDialogs;
749                     if (RET_OK == nResult)
750                     {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://scan.coverity.com/projects/libreoffice?tab=overview

Reply via email to