New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Tue Jul 21 06:52:03 PDT 2015


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.
4 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 1312089:  Uninitialized members  (UNINIT_CTOR)
/fpicker/source/office/RemoteFilesDialog.cxx: 218 in RemoteFilesDialog::RemoteFilesDialog(vcl::Window *, long)()


________________________________________________________________________________________________________
*** CID 1312089:  Uninitialized members  (UNINIT_CTOR)
/fpicker/source/office/RemoteFilesDialog.cxx: 218 in RemoteFilesDialog::RemoteFilesDialog(vcl::Window *, long)()
212     
213         FillServicesListbox();
214     
215         m_pServices_lb->SetSelectHdl( LINK( this, RemoteFilesDialog, SelectServiceHdl ) );
216     
217         m_pFilter_lb->SetSelectHdl( LINK( this, RemoteFilesDialog, SelectFilterHdl ) );
>>>     CID 1312089:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "m_pFileNotifier" is not initialized in this constructor nor in any functions that it calls.
218     }
219     
220     RemoteFilesDialog::~RemoteFilesDialog()
221     {
222         disposeOnce();
223     }

** CID 1312088:  Uninitialized members  (UNINIT_CTOR)
/fpicker/source/office/RemoteFilesDialog.cxx: 29 in FileViewContainer::FileViewContainer(vcl::Window *)()


________________________________________________________________________________________________________
*** CID 1312088:  Uninitialized members  (UNINIT_CTOR)
/fpicker/source/office/RemoteFilesDialog.cxx: 29 in FileViewContainer::FileViewContainer(vcl::Window *)()
23         FileViewContainer( vcl::Window *pParent )
24             : Window( pParent, WB_TABSTOP )
25             , m_pFileView( NULL )
26             , m_pTreeView( NULL )
27             , m_pSplitter( NULL )
28         {
>>>     CID 1312088:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "m_nCurrentFocus" is not initialized in this constructor nor in any functions that it calls.
29         }
30     
31         virtual ~FileViewContainer()
32         {
33             disposeOnce();
34         }

** CID 1312087:    (RESOURCE_LEAK)
/svtools/source/contnr/foldertree.cxx: 65 in FolderTree::FillTreeEntry(SvTreeListEntry *)()
/svtools/source/contnr/foldertree.cxx: 65 in FolderTree::FillTreeEntry(SvTreeListEntry *)()


________________________________________________________________________________________________________
*** CID 1312087:    (RESOURCE_LEAK)
/svtools/source/contnr/foldertree.cxx: 65 in FolderTree::FillTreeEntry(SvTreeListEntry *)()
59                             OUString* sData = new OUString( aContent[i]->maTargetURL );
60                             pNewEntry->SetUserData( static_cast< void* >( sData ) );
61                         }
62                     }
63                 }
64             }
>>>     CID 1312087:    (RESOURCE_LEAK)
>>>     Variable "pContentEnumerator" going out of scope leaks the storage it points to.
65         }
66     }
67     
68     void FolderTree::SetTreePath( OUString const & sUrl )
69     {
70         INetURLObject aUrl( sUrl );
/svtools/source/contnr/foldertree.cxx: 65 in FolderTree::FillTreeEntry(SvTreeListEntry *)()
59                             OUString* sData = new OUString( aContent[i]->maTargetURL );
60                             pNewEntry->SetUserData( static_cast< void* >( sData ) );
61                         }
62                     }
63                 }
64             }
>>>     CID 1312087:    (RESOURCE_LEAK)
>>>     Variable "pContentEnumerator" going out of scope leaks the storage it points to.
65         }
66     }
67     
68     void FolderTree::SetTreePath( OUString const & sUrl )
69     {
70         INetURLObject aUrl( sUrl );

** CID 1312086:  Memory - illegal accesses  (OVERRUN)
/fpicker/source/office/RemoteFilesDialog.cxx: 93 in FileViewContainer::changeFocus(bool)()


________________________________________________________________________________________________________
*** CID 1312086:  Memory - illegal accesses  (OVERRUN)
/fpicker/source/office/RemoteFilesDialog.cxx: 93 in FileViewContainer::changeFocus(bool)()
87         {
88             if( !m_pFileView || !m_pTreeView )
89                 return;
90     
91             if( !bReverse && m_nCurrentFocus < 4 )
92             {
>>>     CID 1312086:  Memory - illegal accesses  (OVERRUN)
>>>     Overrunning array "this->m_pFocusWidgets" of 4 8-byte elements at element index 4 (byte offset 32) using index "++this->m_nCurrentFocus" (which evaluates to 4).
93                 m_pFocusWidgets[++m_nCurrentFocus]->SetFakeFocus( true );
94                 m_pFocusWidgets[m_nCurrentFocus]->GrabFocus();
95             }
96             else if( m_nCurrentFocus > 0 )
97             {
98                 m_pFocusWidgets[--m_nCurrentFocus]->SetFakeFocus( true );

** CID 1312085:  Null pointer dereferences  (NULL_RETURNS)
/fpicker/source/office/RemoteFilesDialog.cxx: 631 in RemoteFilesDialog::SelectHdl(void *)()


________________________________________________________________________________________________________
*** CID 1312085:  Null pointer dereferences  (NULL_RETURNS)
/fpicker/source/office/RemoteFilesDialog.cxx: 631 in RemoteFilesDialog::SelectHdl(void *)()
625     
626         return 1;
627     }
628     
629     IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
630     {
>>>     CID 1312085:  Null pointer dereferences  (NULL_RETURNS)
>>>     Assigning: "pEntry" = null return value from "FirstSelected".
631         SvTreeListEntry* pEntry = m_pFileView->FirstSelected();
632         SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() );
633     
634         if( ( pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_PATHDLG ) )
635            || ( !pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_FILEDLG ) ) )
636         {

** CID 1312084:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/file/FResultSet.cxx: 542 in connectivity::file::OResultSet::insertRow()()


________________________________________________________________________________________________________
*** CID 1312084:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/file/FResultSet.cxx: 542 in connectivity::file::OResultSet::insertRow()()
536     
537         if(!m_bInserted || !m_pTable)
538             throwFunctionSequenceException(*this);
539     
540         // we know that we append new rows at the end
541         // so we have to know where the end is
>>>     CID 1312084:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "skipDeleted" without checking return value (as is done elsewhere 8 out of 10 times).
542         m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,false);
543         m_bRowInserted = m_pTable->InsertRow(*m_aInsertRow, true, m_xColsIdx);
544         if(m_bRowInserted && m_pFileSet.is())
545         {
546             sal_Int32 nPos = (m_aInsertRow->get())[0]->getValue();
547             m_pFileSet->get().push_back(nPos);


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

To manage Coverity Scan email notifications for "libreoffice at lists.freedesktop.org", click https://scan.coverity.com/subscriptions/edit?email=libreoffice%40lists.freedesktop.org&token=d6481d718a775246b2340f282ebe5939



More information about the LibreOffice mailing list