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.
9 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 3 of 3 defect(s)


** CID 1358029:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/ui/misc/bookmark.cxx: 435 in BookmarkTable::GetNameProposal()()


________________________________________________________________________________________________________
*** CID 1358029:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/ui/misc/bookmark.cxx: 435 in BookmarkTable::GetNameProposal()()
429             sal_Int32 nIndex = 0;
430             if (sName.getToken(0, ' ', nIndex) == sDefaultBookmarkName)
431             {
432                 sal_Int32 nCurrBookmarkId = sName.getToken(0, ' ', 
nIndex).toInt32();
433                 nHighestBookmarkId = 
std::max<sal_Int32>(nHighestBookmarkId, nCurrBookmarkId);
434             }
>>>     CID 1358029:  Null pointer dereferences  (NULL_RETURNS)
>>>     Assigning: "pEntry" = null return value from "Next".
435             pEntry = Next(pEntry);
436         }
437         return sDefaultBookmarkName + " " + 
OUString::number(nHighestBookmarkId + 1);
438     }
439     

** CID 1358028:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/ui/misc/bookmark.cxx: 398 in 
BookmarkTable::GetRowByBookmarkName(const rtl::OUString &)()


________________________________________________________________________________________________________
*** CID 1358028:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/ui/misc/bookmark.cxx: 398 in 
BookmarkTable::GetRowByBookmarkName(const rtl::OUString &)()
392         {
393             sw::mark::IMark* pBookmark = 
static_cast<sw::mark::IMark*>(pEntry->GetUserData());
394             if (pBookmark->GetName() == sName)
395             {
396                 return pEntry;
397             }
>>>     CID 1358028:  Null pointer dereferences  (NULL_RETURNS)
>>>     Assigning: "pEntry" = null return value from "Next".
398             pEntry = Next(pEntry);
399         }
400         return nullptr;
401     }
402     
403     sw::mark::IMark* BookmarkTable::GetBookmarkByName(const OUString& sName)

** CID 1358027:  API usage errors  (INVALIDATE_ITERATOR)
/reportdesign/source/ui/dlg/GroupsSorting.cxx: 679 in 
rptui::OFieldExpressionControl::elementRemoved(const 
com::sun::star::container::ContainerEvent &)()


________________________________________________________________________________________________________
*** CID 1358027:  API usage errors  (INVALIDATE_ITERATOR)
/reportdesign/source/ui/dlg/GroupsSorting.cxx: 679 in 
rptui::OFieldExpressionControl::elementRemoved(const 
com::sun::star::container::ContainerEvent &)()
673         if ( evt.Accessor >>= nGroupPos )
674         {
675             ::std::vector<sal_Int32>::iterator aFind = 
::std::find(m_aGroupPositions.begin(),m_aGroupPositions.end(),nGroupPos);
676             ::std::vector<sal_Int32>::const_iterator aEnd  = 
m_aGroupPositions.end();
677             if (aFind != aEnd)
678             {
>>>     CID 1358027:  API usage errors  (INVALIDATE_ITERATOR)
>>>     Dereferencing iterator "aFind" though it is already past the end of its 
>>> container.
679                 *aFind = NO_GROUP;
680                 for(++aFind;aFind != aEnd;++aFind)
681                     if ( *aFind != NO_GROUP )
682                         --*aFind;
683                 Invalidate();
684             }


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

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

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to