On 28.12.2024 8.55, scan-admin@xxxxxxxxxxxx wrote:
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
2 new defect(s) introduced to LibreOffice found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1637331: API usage errors (INVALIDATE_ITERATOR)
/desktop/source/lib/init.cxx: 7697 in lo_setDocumentPassword(_LibreOfficeKit *, const char *, const char *)()
________________________________________________________________________________________________________
*** CID 1637331: API usage errors (INVALIDATE_ITERATOR)
/desktop/source/lib/init.cxx: 7697 in lo_setDocumentPassword(_LibreOfficeKit *, const char *, const char *)()
7691 SetLastExceptionMsg();
7692
7693 assert(pThis);
7694 assert(pURL);
7695 LibLibreOffice_Impl *const pLib = static_cast<LibLibreOffice_Impl*>(pThis);
7696 assert(pLib->mInteractionMap.contains(OString(pURL)));
CID 1637331: API usage errors (INVALIDATE_ITERATOR)
Dereferencing iterator "pLib->mInteractionMap.find(rtl::OString(pURL, rtl::libreoffice_internal::Dummy()))" though it is already past the end of its container.
7697 pLib->mInteractionMap.find(OString(pURL))->second->SetPassword(pPassword);
7698 }
7699
7700 static char* lo_getVersionInfo(SAL_UNUSED_PARAMETER LibreOfficeKit* /*pThis*/)
7701 {
7702 SetLastExceptionMsg();
Is this a false positive?
From
https://gerrit.libreoffice.org/c/core/+/178659/5/desktop/source/lib/init.cxx
Ilmari