New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Tue Nov 14 10:19:49 UTC 2023
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
5 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 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 5 of 5 defect(s)
** CID 1550047: Uninitialized members (UNINIT_CTOR)
/sd/source/ui/app/optsitem.cxx: 430 in SdOptionsMisc::SdOptionsMisc(bool, bool)()
________________________________________________________________________________________________________
*** CID 1550047: Uninitialized members (UNINIT_CTOR)
/sd/source/ui/app/optsitem.cxx: 430 in SdOptionsMisc::SdOptionsMisc(bool, bool)()
424 // The default for 6.1-and-above documents is to use printer-independent
425 // formatting.
426 mnPrinterIndependentLayout (1),
427 mnDragThresholdPixels(6)
428 {
429 EnableModify( true );
>>> CID 1550047: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "bPresenterScreenFullScreen" is not initialized in this constructor nor in any functions that it calls.
430 }
431
432 bool SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
433 {
434 return( IsStartWithTemplate() == rOpt.IsStartWithTemplate() &&
435 IsMarkedHitMovesAlways() == rOpt.IsMarkedHitMovesAlways() &&
** CID 1550046: Memory - corruptions (BAD_FREE)
________________________________________________________________________________________________________
*** CID 1550046: Memory - corruptions (BAD_FREE)
/sw/source/filter/writer/writer.cxx: 342 in Writer::PutNumFormatFontsInAttrPool()()
336 if( *pFont == *pDefFont )
337 continue;
338 }
339 else if( *pFont == *pDefFont )
340 bCheck = true;
341
>>> CID 1550046: Memory - corruptions (BAD_FREE)
>>> "AddFontItem" frees address of "SvxFontItem(pFont->GetFamilyType(), rtl::OUString(pFont->GetFamilyName()), rtl::OUString(pFont->GetStyleName()), pFont->GetPitch(), pFont->GetCharSet(), 7)".
342 AddFontItem( rPool, SvxFontItem( pFont->GetFamilyType(),
343 pFont->GetFamilyName(), pFont->GetStyleName(),
344 pFont->GetPitch(), pFont->GetCharSet(), RES_CHRATR_FONT ));
345 }
346 }
347 }
** CID 1550045: Memory - corruptions (BAD_FREE)
________________________________________________________________________________________________________
*** CID 1550045: Memory - corruptions (BAD_FREE)
/sw/source/filter/writer/writer.cxx: 388 in Writer::AddFontItem(SfxItemPool &, const SvxFontItem &)()
382 pItem = &rPool.DirectPutItemInPool( aFont );
383 }
384 else
385 pItem = &rPool.DirectPutItemInPool( rFont );
386
387 if( 1 < pItem->GetRefCount() )
>>> CID 1550045: Memory - corruptions (BAD_FREE)
>>> "DirectRemoveItemFromPool" frees incorrect pointer "pItem".
388 rPool.DirectRemoveItemFromPool( *pItem );
389 else
390 {
391 m_pImpl->aFontRemoveLst.push_back( pItem );
392 }
393 }
** CID 1550044: Memory - illegal accesses (RETURN_LOCAL)
/svx/source/dialog/framelinkarray.cxx: 358 in svx::frame::ArrayImpl::ArrayImpl(int, int)()
________________________________________________________________________________________________________
*** CID 1550044: Memory - illegal accesses (RETURN_LOCAL)
/svx/source/dialog/framelinkarray.cxx: 358 in svx::frame::ArrayImpl::ArrayImpl(int, int)()
352 mbXCoordsDirty( false ),
353 mbYCoordsDirty( false ),
354 mbMayHaveCellRotation( false )
355 {
356 const Cell* pDefaultCell = &mxPool->DirectPutItemInPool(Cell());
357 // default-construct all vectors
>>> CID 1550044: Memory - illegal accesses (RETURN_LOCAL)
>>> Using "pDefaultCell", which points to an out-of-scope temporary variable of type "svx::frame::<unnamed>::Cell".
358 maCells.resize( mnWidth * mnHeight, pDefaultCell );
359 maWidths.resize( mnWidth, 0 );
360 maHeights.resize( mnHeight, 0 );
361 maXCoords.resize( mnWidth + 1, 0 );
362 maYCoords.resize( mnHeight + 1, 0 );
363 }
** CID 1550043: Memory - illegal accesses (RETURN_LOCAL)
/sw/source/filter/writer/writer.cxx: 387 in Writer::AddFontItem(SfxItemPool &, const SvxFontItem &)()
________________________________________________________________________________________________________
*** CID 1550043: Memory - illegal accesses (RETURN_LOCAL)
/sw/source/filter/writer/writer.cxx: 387 in Writer::AddFontItem(SfxItemPool &, const SvxFontItem &)()
381 aFont.SetWhich( RES_CHRATR_FONT );
382 pItem = &rPool.DirectPutItemInPool( aFont );
383 }
384 else
385 pItem = &rPool.DirectPutItemInPool( rFont );
386
>>> CID 1550043: Memory - illegal accesses (RETURN_LOCAL)
>>> Using "pItem", which points to an out-of-scope variable "aFont".
387 if( 1 < pItem->GetRefCount() )
388 rPool.DirectRemoveItemFromPool( *pItem );
389 else
390 {
391 m_pImpl->aFontRemoveLst.push_back( pItem );
392 }
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DmglG_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiDzYjZOM00xbip4CkX8ImF9HY9c60hoJEyXLRjJwo17yE79ymVBQMTmAN4hxdzCdrLaqC2oiyqhTZSgsMqN-2BQszgkaxaD3WCsR1M13p8K5f4-2BukNvq3EfJqXt6VD2cU2o5JHLuQdDZO0lWRQBBU9lK8ve2U5b-2BlckVy3BoWVaB54-3D
More information about the LibreOffice
mailing list