New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Tue Jan 16 03:29:20 UTC 2024
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.
22 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 1586339: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/sc/inc/fstalgorithm.hxx: 67 in sc::buildSpanWithValue<int, CellAttributeHolder, <unnamed>::PatternSpan>(std::vector<T3, std::allocator<T3>> &, mdds::flat_segment_tree<T1, T2>::const_iterator, mdds::flat_segment_tree<T1, T2>::const_iterator)()
________________________________________________________________________________________________________
*** CID 1586339: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/sc/inc/fstalgorithm.hxx: 67 in sc::buildSpanWithValue<int, CellAttributeHolder, <unnamed>::PatternSpan>(std::vector<T3, std::allocator<T3>> &, mdds::flat_segment_tree<T1, T2>::const_iterator, mdds::flat_segment_tree<T1, T2>::const_iterator)()
61 Key nIndex1 = nLastPos;
62 Key nIndex2 = nThisPos-1;
63 rSpans.push_back(Span(nIndex1, nIndex2, nLastVal));
64 }
65
66 nLastPos = nThisPos;
>>> CID 1586339: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "nThisVal" is copied in a call to copy assignment "operator =", when it could be moved instead.
67 nLastVal = nThisVal;
68 }
69 }
70
71 /**
72 * Convert a flat_segment_tree structure whose value type is boolean, into
** CID 1586338: (UNINIT)
________________________________________________________________________________________________________
*** CID 1586338: (UNINIT)
/sw/source/core/unocore/unodraw.cxx: 1333 in SwXShape::setPropertyValue(const rtl::OUString &, const com::sun::star::uno::Any &)()
1327 }
1328 //anchor position has to be inserted after the text attribute has been inserted
1329 aNewAnchor.SetAnchor( aPam.GetPoint() );
1330 aSet.Put( aNewAnchor );
1331 pFormat->SetFormatAttr(aSet);
1332 bSetAttr = false;
>>> CID 1586338: (UNINIT)
>>> Using uninitialized value "aNewAnchor.m_oContentAnchor._M_payload._M_payload" when calling "~SwFormatAnchor".
1333 }
1334 if( text::TextContentAnchorType_AS_CHARACTER == eNewAnchor &&
1335 (RndStdIds::FLY_AS_CHAR != eOldAnchorId))
1336 {
1337 SwPaM aPam(pDoc->GetNodes().GetEndOfContent());
1338 if( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() )
/sw/source/core/unocore/unodraw.cxx: 1360 in SwXShape::setPropertyValue(const rtl::OUString &, const com::sun::star::uno::Any &)()
1354 aPam.GetPoint()->GetContentIndex(), 0 );
1355 aPam.GetPoint()->AdjustContent(-1); // InsertItem moved it
1356 SwFormatAnchor aNewAnchor(
1357 aSet.Get(RES_ANCHOR));
1358 aNewAnchor.SetAnchor( aPam.GetPoint() );
1359 aSet.Put( aNewAnchor );
>>> CID 1586338: (UNINIT)
>>> Using uninitialized value "aNewAnchor.m_oContentAnchor._M_payload._M_payload" when calling "~SwFormatAnchor".
1360 }
1361 if( bSetAttr )
1362 pFormat->SetFormatAttr(aSet);
1363
1364 // If this property is an anchor change, and there is a group shape with textboxes
1365 // do anchor sync in time unless the anchor sync in the porfly will cause crash during
** CID 1586337: Uninitialized variables (UNINIT)
________________________________________________________________________________________________________
*** CID 1586337: Uninitialized variables (UNINIT)
/sw/source/core/doc/docdraw.cxx: 291 in SwDoc::GroupSelection(SdrView &)()
285
286 if( pUndo )
287 {
288 pUndo->SetGroupFormat( pFormat );
289 GetIDocumentUndoRedo().AppendUndo( std::move(pUndo) );
290 }
>>> CID 1586337: Uninitialized variables (UNINIT)
>>> Using uninitialized value "aAnch.m_oContentAnchor._M_payload._M_payload" when calling "~SwFormatAnchor".
291 }
292 else
293 {
294 if (GetIDocumentUndoRedo().DoesUndo())
295 {
296 GetIDocumentUndoRedo().ClearRedo();
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3D83Vv_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiyIa5CIWMCSnk2hqxqf78ad86Cy2rbyGltAEC4QTyjG5CvJFsVbLki-2B-2FS-2FbHDPZl8IvdlfX2dO-2FAm8pVMLuYNpfqBl5R04heTd6LZgijRWnm83IsH84-2BGEwNtwodD5qfb9W59mcw-2F9rTwEs2KXrQCQfuIMNjSETzeg-2FvQZfJj5ek-3D
More information about the LibreOffice
mailing list