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.
47 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 1677777: Error handling issues (CHECKED_RETURN)
/tools/source/xml/XPath.cxx: 19 in tools::<unnamed>::convert(const
unsigned char *)()
_____________________________________________________________________________________________
*** CID 1677777: Error handling issues (CHECKED_RETURN)
/tools/source/xml/XPath.cxx: 19 in tools::<unnamed>::convert(const
unsigned char *)()
13 {
14 namespace
15 {
16 OUString convert(xmlChar const* sXmlString)
17 {
18 OUString sString;
>>> CID 1677777: Error handling issues (CHECKED_RETURN)
>>> Calling "rtl_convertStringToUString" without checking return value (as
>>> is done elsewhere 19 out of 20 times).
19 rtl_convertStringToUString(&sString.pData, reinterpret_cast<char
const*>(sXmlString),
20 xmlStrlen(sXmlString),
RTL_TEXTENCODING_UTF8,
21 RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
22 |
RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
23 |
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR);
24 return sString;
** CID 1677776: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/filter/xml/xmltransformationi.cxx: 238 in
ScXMLColumnSortContext::~ScXMLColumnSortContext()()
_____________________________________________________________________________________________
*** CID 1677776: Error handling issues (UNCAUGHT_EXCEPT)
/sc/source/filter/xml/xmltransformationi.cxx: 238 in
ScXMLColumnSortContext::~ScXMLColumnSortContext()()
232 ScXMLColumnSortContext::ScXMLColumnSortContext(
233 ScXMLImport& rImport, const
rtl::Reference<sax_fastparser::FastAttributeList>& /*rAttrList*/)
234 : ScXMLImportContext(rImport)
235 {
236 }
237
>>> CID 1677776: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" is
>>> thrown but the exception specification "/*implicit*/noexcept" doesn't allow
>>> it to be thrown. This will result in a call to terminate().
238 ScXMLColumnSortContext::~ScXMLColumnSortContext()
239 {
240 ScDocument* pDoc = GetScImport().GetDocument();
241 auto& rDataSources = pDoc->GetExternalDataMapper().getDataSources();
242 if (!rDataSources.empty())
243 {
** CID 1677775: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/tools/source/xml/XPath.cxx: 68 in tools::XPath::XPath(_xmlDoc *,
std::function<void (_xmlXPathContext *)>)()
_____________________________________________________________________________________________
*** CID 1677775: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/tools/source/xml/XPath.cxx: 68 in tools::XPath::XPath(_xmlDoc *,
std::function<void (_xmlXPathContext *)>)()
62 : XPath(pDocPtr, [](xmlXPathContextPtr) {})
63 {
64 }
65
66 XPath::XPath(xmlDocPtr pDocPtr, std::function<void(xmlXPathContextPtr)>
funcRegisterNamespaces)
67 : mpXmlDocPtr(pDocPtr)
>>> CID 1677775: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "funcRegisterNamespaces" is passed-by-value as parameter to
>>> "std::function<void (_xmlXPathContext *)>::function(std::function<void
>>> (_xmlXPathContext *)> const &)", when it could be moved instead.
68 , mFuncRegisterNamespaces(funcRegisterNamespaces)
69 {
70 }
71
72 std::unique_ptr<XPathObject> XPath::create(std::string_view aString)
73 {
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://scan.coverity.com/projects/libreoffice?tab=overview