New Defects reported by Coverity Scan for LibreOffice

2024-09-17 Thread scan-admin
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.
21 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 1619461:  Uninitialized members  (UNINIT_CTOR)
/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx: 395 in 
DigitalSignaturesDialog::canRemove(const std::function 
&)::[lambda(bool) (instance 1)]::lambda([lambda(bool) (instance 1)]&&)()



*** CID 1619461:  Uninitialized members  (UNINIT_CTOR)
/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx: 395 in 
DigitalSignaturesDialog::canRemove(const std::function 
&)::[lambda(bool) (instance 1)]::lambda([lambda(bool) (instance 1)]&&)()
389 }
390 
391 bool DigitalSignaturesDialog::canAdd() { return canAddRemove(); }
392 
393 void DigitalSignaturesDialog::canRemove(const 
std::function& rCallback)
394 {
>>> CID 1619461:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
395 auto onFinished = [this, rCallback](bool bRet) {
396 rCallback(bRet && canAddRemove());
397 };
398 bool bRet = true;
399 
400 if ( maSignatureManager.getSignatureMode() == 
DocumentSignatureMode::Content )

** CID 1619460:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/config/cfgitems.cxx: 129 in SwElemItem::SwElemItem(const 
SwViewOption &)()



*** CID 1619460:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/config/cfgitems.cxx: 129 in SwElemItem::SwElemItem(const 
SwViewOption &)()
123 m_bShowInlineTooltips = rVOpt.IsShowInlineTooltips();
124 m_bShowOutlineContentVisibilityButton = 
rVOpt.IsShowOutlineContentVisibilityButton();
125 m_bTreatSubOutlineLevelsAsContent = 
rVOpt.IsTreatSubOutlineLevelsAsContent();
126 m_bShowChangesInMargin = rVOpt.IsShowChangesInMargin();
127 m_bFieldHiddenText = rVOpt.IsShowHiddenField();
128 m_bShowHiddenPara  = rVOpt.IsShowHiddenPara();
>>> CID 1619460:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nDefaultZoomValue" is not initialized in 
>>> this constructor nor in any functions that it calls.
129 }
130 
131 SwElemItem* SwElemItem::Clone( SfxItemPool* ) const
132 {
133 return new SwElemItem( *this );
134 }

** CID 1619459:  Uninitialized members  (UNINIT_CTOR)
/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx: 395 in 
DigitalSignaturesDialog::canRemove(const std::function 
&)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) (instance 1)]&)()



*** CID 1619459:  Uninitialized members  (UNINIT_CTOR)
/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx: 395 in 
DigitalSignaturesDialog::canRemove(const std::function 
&)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) (instance 1)]&)()
389 }
390 
391 bool DigitalSignaturesDialog::canAdd() { return canAddRemove(); }
392 
393 void DigitalSignaturesDialog::canRemove(const 
std::function& rCallback)
394 {
>>> CID 1619459:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
395 auto onFinished = [this, rCallback](bool bRet) {
396 rCallback(bRet && canAddRemove());
397 };
398 bool bRet = true;
399 
400 if ( maSignatureManager.getSignatureMode() == 
DocumentSignatureMode::Content )



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DRvwX_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGthfeXcDC7QSPMYTQjXzqxP8q9VEhm06x8j1zN7Xyt7NmFRNzhfA42mu2tAZCxsrjO8bieBAZpFu9Wxt299dX0bxQW1EOQSgDMqu6iaDzndLa7aBV0N1lGykyZLLg9bXWCDpVkvIjLpZnGRYliTspPWJbdXsBExnfy1SXgPyUFdwk-3D



New Defects reported by Coverity Scan for LibreOffice

2024-09-16 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
20 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 1 of 1 defect(s)


** CID 1619433:(UNINIT)



*** CID 1619433:(UNINIT)
/sw/source/core/unocore/unotbl.cxx: 171 in 
::lcl_SendChartEvent(std::mutex &, const 
com::sun::star::uno::Reference &, 
comphelper::OInterfaceContainerHelper4
 &)()
165 
166 void lcl_SendChartEvent(std::mutex& rMutex,
167 uno::Reference const& xSource,
168 
::comphelper::OInterfaceContainerHelper4 
& rListeners)
169 {
170 std::unique_lock aGuard(rMutex);
>>> CID 1619433:(UNINIT)
>>> Using uninitialized value "aGuard._M_owns" when calling 
>>> "lcl_SendChartEvent".
171 lcl_SendChartEvent(aGuard, xSource, rListeners);
172 }
173 }
174 
175 #define UNO_TABLE_COLUMN_SUM 1
176 
/sw/source/core/unocore/unotbl.cxx: 171 in 
::lcl_SendChartEvent(std::mutex &, const 
com::sun::star::uno::Reference &, 
comphelper::OInterfaceContainerHelper4
 &)()
165 
166 void lcl_SendChartEvent(std::mutex& rMutex,
167 uno::Reference const& xSource,
168 
::comphelper::OInterfaceContainerHelper4 
& rListeners)
169 {
170 std::unique_lock aGuard(rMutex);
>>> CID 1619433:(UNINIT)
>>> Using uninitialized value "aGuard._M_device" when calling 
>>> "lcl_SendChartEvent".
171 lcl_SendChartEvent(aGuard, xSource, rListeners);
172 }
173 }
174 
175 #define UNO_TABLE_COLUMN_SUM 1
176 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DXDTc_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGt-2Bljo467Cjf1mH1B9rqR44nHZ3Nn3uSMLEJVfaNiBbBjgcQTdGyhYxjCQtVpHWJBAxUJ5BmPYNOdiUuXFSby7aaBbj58s6xDYdnuFE7udFN441ocD-2BK4QjaU4M-2BtwecgXure7kKuJH5iOh00XNDTXDBZoiqjWVfP17ydZXg00Dxw-3D



New Defects reported by Coverity Scan for LibreOffice

2024-09-15 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
3 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 1 of 1 defect(s)


** CID 1619429:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1619429:  Null pointer dereferences  (NULL_RETURNS)
/sc/source/ui/docshell/docsh.cxx: 2643 in ScDocShell::ConvertTo(SfxMedium &)()
2637 bRet = true;
2638 
2639 if (m_pDocument->GetTableCount() > 1)
2640 if (!rMed.GetErrorIgnoreWarning() && 
SC_MOD()->GetInputOptions().GetWarnActiveSheet())
2641 {
2642 ScTabViewShell* pViewShell = 
GetBestViewShell();
>>> CID 1619429:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pViewShell" when 
>>> calling "ExecuteOnlyActiveSheetSavedDlg".
2643 pViewShell->ExecuteOnlyActiveSheetSavedDlg();
2644 }
2645 }
2646 }
2647 }
2648 else if (aFltName == pFilterDBase)



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DaxPX_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtxaktE6ZJstZ6PCnoAj5dr0V8DZ-2FHrieFwS6CsYUtvkdgZg18L6LYWQglJPMz2fmLltZA9CVLijFdi1F8V4dqIc1q3fqR7lnG9exgQhjF0cIKcDOR82iXUxbOw5JpEt65R8Cr5iH73zubSPIEjC5zYGfJ0yji6w4jcb9wH58qRPw-3D



New Defects reported by Coverity Scan for LibreOffice

2024-09-14 Thread scan-admin
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.
10 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 1619417:  API usage errors  (SWAPPED_ARGUMENTS)



*** CID 1619417:  API usage errors  (SWAPPED_ARGUMENTS)
/sw/source/core/doc/docruby.cxx: 224 in SwDoc::SetRubyList(SwPaM &, const 
std::vector>, 
std::allocator>>> &)()
218 nTotalContentGrowth += pEntry->GetText().getLength();
219 }
220 }
221 
222 // Expand selection to account for insertion
223 rPam.Normalize();
>>> CID 1619417:  API usage errors  (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the constructor for "SwPaM" do not match 
>>> the ordering of the parameters:
* "aOrigPam.GetPoint()" is passed to "rMark".
* "rPam->GetMark()" is passed to "rPoint".
224 rPam = SwPaM{ *aOrigPam.GetPoint(), *rPam.GetMark() };
225 if (*rPam.GetPoint() == *rPam.GetMark())
226 {
227 rPam.GetPoint()->AdjustContent(-nTotalContentGrowth);
228 }
229 

** CID 1619416:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4408 in SfxMedium::SignContents_Impl(weld::Window 
*, bool, bool, const std::function &, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &)::[lambda(bool) (instance 2)]::lambda([lambda(bool) (instance 
2)]&&)()



*** CID 1619416:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4408 in SfxMedium::SignContents_Impl(weld::Window 
*, bool, bool, const std::function &, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &)::[lambda(bool) (instance 2)]::lambda([lambda(bool) (instance 
2)]&&)()
4402 // note: the storage passed here must be independent from 
the
4403 // xWriteableZipStor because a writable storage can't have 
2
4404 // instances of sub-storage for the same directory open, 
but with
4405 // independent storages it somehow works
4406 xModelSigner->SignScriptingContentAsync(
4407 GetScriptingStorageToSign_Impl(), xStream,
>>> CID 1619416:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
4408 [this, xSigner, xMetaInf, xWriteableZipStor,
4409  onSignDocumentContentFinished](bool bRet) {
4410 // remove the document signature if any
4411 OUString aDocSigName = 
xSigner->getDocumentContentSignatureDefaultStreamName();
4412 if ( !aDocSigName.isEmpty() && xMetaInf->hasByName( 
aDocSigName ) )
4413 xMetaInf->removeElement( aDocSigName );

** CID 1619415:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4408 in SfxMedium::SignContents_Impl(weld::Window 
*, bool, bool, const std::function &, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &)::[lambda(bool) (instance 2)]::lambda(const [lambda(bool) 
(instance 2)]&)()



*** CID 1619415:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4408 in SfxMedium::SignContents_Impl(weld::Window 
*, bool, bool, const std::function &, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &)::[lambda(bool) (instance 2)]::lambda(const [lambda(bool) 
(instance 2)]&)()
4402 // note: the storage passed here must be independent from 
the
4403 // xWriteableZipStor because a writable storage can't have 
2
4404 // instances of sub-storage for the same directory open, 
but with
4405 // independent storages it somehow works
4406 xModelSigner->SignScriptingContentAsync(
4407 GetScriptingStorageToSign_Impl(), xStream,
>>> CID 1619415:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
4408

New Defects reported by Coverity Scan for LibreOffice

2024-09-10 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

7 new defect(s) introduced to LibreOffice found with Coverity Scan.
6 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 7 of 7 defect(s)


** CID 1619295:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4341 in SfxMedium::SignContents_Impl(weld::Window 
*, bool, bool, const std::function &, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) 
(instance 1)]&)()



*** CID 1619295:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4341 in SfxMedium::SignContents_Impl(weld::Window 
*, bool, bool, const std::function &, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) 
(instance 1)]&)()
4335 uno::Reference< embed::XStorage > xWriteableZipStor;
4336 
4337 // we can reuse the temporary file if there is one already
4338 CreateTempFile( false );
4339 GetMedium_Impl();
4340 
>>> CID 1619295:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
4341 auto onSignDocumentContentFinished = [this, rCallback](bool bRet) {
4342 CloseAndRelease();
4343 
4344 ResetError();
4345 
4346 rCallback(bRet);

** CID 1619294:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1619294:  Null pointer dereferences  (NULL_RETURNS)
/svx/source/gallery2/galbrws1.cxx: 292 in 
GalleryBrowser1::ImplGalleryThemeProperties(std::basic_string_view>, bool)()
286 void GalleryBrowser1::ImplGalleryThemeProperties( std::u16string_view 
rThemeName, bool bCreateNew )
287 {
288 DBG_ASSERT(!mpThemePropsDlgItemSet, "mpThemePropsDlgItemSet already 
set!");
289 mpThemePropsDlgItemSet.reset(new SfxItemSet( 
SfxGetpApp()->GetPool() ));
290 GalleryTheme*   pTheme = mpGallery->AcquireTheme( rThemeName, 
maLocalListener );
291 
>>> CID 1619294:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pTheme" when calling 
>>> "ImplFillExchangeData".
292 ImplFillExchangeData( pTheme, *mpExchangeData );
293 
294 SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
295 VclPtr xThemePropertiesDialog = 
pFact->CreateGalleryThemePropertiesDialog(mxThemes.get(), mpExchangeData.get(), 
mpThemePropsDlgItemSet.get());
296 
297 if ( bCreateNew )

** CID 1619293:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4486 in SfxMedium::SignContents_Impl(weld::Window 
*, bool, bool, const std::function &, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &)::[lambda() (instance 2)]::lambda(const [lambda() (instance 
2)]&)()



*** CID 1619293:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4486 in SfxMedium::SignContents_Impl(weld::Window 
*, bool, bool, const std::function &, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &)::[lambda() (instance 2)]::lambda(const [lambda() (instance 
2)]&)()
4480 }
4481 else if (xWriteableZipStor.is())
4482 {
4483 // OOXML.
4484 uno::Reference xStream;
4485 
>>> CID 1619293:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
4486 auto onOOXMLSignDocumentContentFinished = [this, 
xWriteableZipStor]() {
4487 uno::Reference 
xTransact(xWriteableZipStor, uno::UNO_QUERY_THROW);
4488 xTransact->commit();
4489 
4490 // the temporary file has been written, commit it 
to the original file
4491 Commit();

** CID 1619292:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4447 in SfxMedium::SignContents_Impl(weld:

New Defects reported by Coverity Scan for LibreOffice

2024-09-08 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
3 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 4 of 4 defect(s)


** CID 1619259:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/objserv.cxx: 2297 in 
SfxObjectShell::SignScriptingContent(weld::Window *, const std::function &)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) (instance 
1)]&)()



*** CID 1619259:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/objserv.cxx: 2297 in 
SfxObjectShell::SignScriptingContent(weld::Window *, const std::function &)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) (instance 
1)]&)()
2291 if (CheckIsReadonly(true, pDialogParent))
2292 {
2293 rCallback(false);
2294 return;
2295 }
2296 
>>> CID 1619259:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
2297 GetMedium()->SignContents_Impl(pDialogParent, true, 
HasValidSignatures(), [this, rCallback](bool bSignSuccess) {
2298 AfterSigning(bSignSuccess, true);
2299 
2300 rCallback(bSignSuccess);
2301 });
2302 }

** CID 1619258:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/objserv.cxx: 2297 in 
SfxObjectShell::SignScriptingContent(weld::Window *, const std::function &)::[lambda(bool) (instance 1)]::lambda([lambda(bool) (instance 1)]&&)()



*** CID 1619258:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/objserv.cxx: 2297 in 
SfxObjectShell::SignScriptingContent(weld::Window *, const std::function &)::[lambda(bool) (instance 1)]::lambda([lambda(bool) (instance 1)]&&)()
2291 if (CheckIsReadonly(true, pDialogParent))
2292 {
2293 rCallback(false);
2294 return;
2295 }
2296 
>>> CID 1619258:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
2297 GetMedium()->SignContents_Impl(pDialogParent, true, 
HasValidSignatures(), [this, rCallback](bool bSignSuccess) {
2298 AfterSigning(bSignSuccess, true);
2299 
2300 rCallback(bSignSuccess);
2301 });
2302 }

** CID 1619257:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/objserv.cxx: 2152 in 
SfxObjectShell::SignDocumentContent(weld::Window *, const std::function &)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) (instance 
1)]&)()



*** CID 1619257:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/objserv.cxx: 2152 in 
SfxObjectShell::SignDocumentContent(weld::Window *, const std::function &)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) (instance 
1)]&)()
2146 {
2147 rCallback(false);
2148 return;
2149 }
2150 
2151 // Async, all code before the end has to go into the callback.
>>> CID 1619257:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
2152 GetMedium()->SignContents_Impl(pDialogParent, false, 
HasValidSignatures(), [this, rCallback](bool bSignSuccess) {
2153 AfterSigning(bSignSuccess, false);
2154 
2155 rCallback(bSignSuccess);
2156 });
2157 }

** CID 1619256:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/objserv.cxx: 2152 in 
SfxObjectShell::SignDocumentContent(weld::Window *, const std::function &)::[lambda(bool) (instance 1)]::lambda([lambda(bool) (instance 1)]&&)()



*** CID 1619256:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/objserv.cxx: 2152 in 
SfxObjectShell::SignDocumentContent(weld::Window *, const std::function &)::[lambda(bool) (instance 1)]::lambda([lambda(bool) (instance 1)]&&)()
2146 {
2147 rCallback(false);
2148 return;
2149 }
2150 
2151 // Async, all code before the end has to go into the callback.
>>> CID 1619256:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
2152 GetMedium()->SignContents_Impl(pDialogParent, false, 
HasValidSignatures(), [this, rCallback](bool bSign

New Defects reported by Coverity Scan for LibreOffice

2024-09-06 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1619147:  Null pointer dereferences  (REVERSE_INULL)
/cui/source/dialogs/hldoctp.cxx: 219 in 
SvxHyperlinkDocTp::ClickTargetHdl_Impl(weld::Button &)()



*** CID 1619147:  Null pointer dereferences  (REVERSE_INULL)
/cui/source/dialogs/hldoctp.cxx: 219 in 
SvxHyperlinkDocTp::ClickTargetHdl_Impl(weld::Button &)()
213  maStrURL.startsWith( sHash ) )
214 {
215 mxMarkWnd->SetError( LERR_NOERROR );
216 
217 weld::WaitObject aWait(mpDialog->getDialog());
218 
>>> CID 1619147:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "this->mxMarkWnd" suggests that it may be null, but it 
>>> has already been dereferenced on all paths leading to the check.
219 if (mxMarkWnd)
220 {
221 if ( maStrURL.equalsIgnoreAsciiCase( INET_FILE_SCHEME ) )
222 mxMarkWnd->RefreshTree ( u""_ustr );
223 else
224 mxMarkWnd->RefreshTree ( maStrURL );



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3Dgp_s_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtAMRRyLkMGA2UYKIfQuWTlMjdN4Yq8XPXgQxwTNHJpJ0qblczbhhBdLHrrtn7gfhVRWRpaLfVtm8mKbrNpsiueMnA571F1uabFKxt8XumWFrqQk03QZoz-2BI0GNB7K599Sx0ZL-2BGM2HH0-2BVNL9iuKC4qvDV57RpBoIwXJLuTEaAYQ-3D



New Defects reported by Coverity Scan for LibreOffice

2024-08-31 Thread scan-admin
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.
17 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 1618766:  Error handling issues  (CHECKED_RETURN)
/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx: 199 in 
ScXMLChangeTrackingImportHelper::GetIDFromString(std::basic_string_view>)()



*** CID 1618766:  Error handling issues  (CHECKED_RETURN)
/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx: 199 in 
ScXMLChangeTrackingImportHelper::GetIDFromString(std::basic_string_view>)()
193 sal_uInt32 nResult(0);
194 if (!sID.empty())
195 {
196 if (sID.substr(0, SC_CHANGE_ID_PREFIX.getLength()) == 
SC_CHANGE_ID_PREFIX)
197 {
198 sal_Int32 nValue;
>>> CID 1618766:  Error handling issues  (CHECKED_RETURN)
>>> Calling "convertNumber" without checking return value (as is done 
>>> elsewhere 21 out of 22 times).
199 ::sax::Converter::convertNumber(nValue, 
sID.substr(SC_CHANGE_ID_PREFIX.getLength()),
200 0, SAL_MAX_INT32);
201 OSL_ENSURE(nValue > 0, "wrong change action ID");
202 nResult = nValue;
203 }
204 else

** CID 1618765:(PASS_BY_VALUE)
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)256, 
frozen::elsa>>>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa>>)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)32, 
frozen::elsa>>>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa>>)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)64, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)64, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)32, frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)256, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)64, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)32, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)32, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)64, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)32, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)64, 
frozen::elsa>>>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa>>)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)64, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa)()
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)32, 
frozen::elsa>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 
frozen::elsa)()



*** CID 1618765:(PASS_BY_VALUE)
/workdir/UnpackedTarball/frozen/include/frozen/bits/pmh.h: 158 in 
frozen::bits::pmh_tables<(unsigned long)256, 
frozen::elsa>>>::pmh_tables(unsigned long, 
frozen::bits::carray, 
frozen::bits::carray, 

New Defects reported by Coverity Scan for LibreOffice

2024-08-29 Thread scan-admin
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.
16 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 1618707:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1618707:  Null pointer dereferences  (FORWARD_NULL)
/svx/source/sdr/primitive2d/sdrattributecreator.cxx: 858 in 
drawinglayer::primitive2d::createNewSdrLineEffectsTextAttribute(const 
SfxItemSet &, const SdrText *)()
852 
853 if(!aLine.isDefault() || !aText.isDefault())
854 {
855 // try shadow
856 attribute::SdrShadowAttribute 
aShadow(createNewSdrShadowAttribute(rSet));
857 attribute::SdrGlowAttribute aGlow = 
createNewSdrGlowAttribute(rSet);
>>> CID 1618707:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pText" to "GetObject", which dereferences it.
858 attribute::SdrGlowTextAttribute aGlowText = 
createNewSdrGlowTextAttribute(rSet, pText->GetObject());
859 const sal_Int32 
nSoftEdgeRadius(getSoftEdgeRadius(rSet));
860 
861 return 
attribute::SdrLineEffectsTextAttribute(std::move(aLine),
862   
std::move(aLineStartEnd),
863   
std::move(aShadow),

** CID 1618706:  Integer handling issues  (INTEGER_OVERFLOW)
/sw/source/writerfilter/ooxml/OOXMLPropertySet.cxx: 281 in 
writerfilter::ooxml::OOXMLValue::createHexColor(std::basic_string_view>)()



*** CID 1618706:  Integer handling issues  (INTEGER_OVERFLOW)
/sw/source/writerfilter/ooxml/OOXMLPropertySet.cxx: 281 in 
writerfilter::ooxml::OOXMLValue::createHexColor(std::basic_string_view>)()
275 // Word appears to require strict 6 digit length, else it 
ignores it
276 if ( nLen == 7 )
277 {
278 const OUString sHashColor(pValue.data(), nLen, 
RTL_TEXTENCODING_ASCII_US);
279 sax::Converter::convertColor( nColor, sHashColor );
280 }
>>> CID 1618706:  Integer handling issues  (INTEGER_OVERFLOW)
>>> Expression "aValue", which is equal to -1, where "nColor" is known to 
>>> be equal to -1, overflows the type that receives it, an unsigned integer 32 
>>> bits wide.
281 aValue = nColor;
282 }
283 return OOXMLValue(VariantType(std::in_place_index_t<5>(), aValue));
284 }
285 
286 // static

** CID 1618705:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1618705:  Null pointer dereferences  (FORWARD_NULL)
/svx/source/sdr/primitive2d/sdrattributecreator.cxx: 933 in 
drawinglayer::primitive2d::createNewSdrLineFillEffectsTextAttribute(const 
SfxItemSet &, const SdrText *, bool, bool)()
927 createNewSdrShadowAttribute(rSet) : 
attribute::SdrShadowAttribute();
928 
929 // glow
930 const attribute::SdrGlowAttribute aGlow = 
createNewSdrGlowAttribute(rSet);
931 
932 // text glow
>>> CID 1618705:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pText" to "GetObject", which dereferences it.
933 const attribute::SdrGlowTextAttribute aGlowText = 
createNewSdrGlowTextAttribute(rSet, pText->GetObject());
934 
935 const sal_Int32 
nSoftEdgeRadius(getSoftEdgeRadius(rSet));
936 
937 return 
attribute::SdrLineFillEffectsTextAttribute(aLine, std::move(aFill), 
aLineStartEnd,
938   
aShadow, std::move(aFillFloatTransGradient),

** CID 1618704:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1618704:  Null pointer dereferences  (FORWARD_NULL)
/svx/source/sdr/primitive2d/sdrattributecreator.cxx: 810 in 
drawinglayer::primitive2d::createNewSdrEffectsTextAttribute(const SfxItemSet &, 
const SdrText *, bool)()
804 aText = createNewSdrTextAttribute(rSet, *pText);
805 }
806 
807 // try shadow
808 const attribute::SdrShadowAttribute 
aShadow(createNewSdrShadowAttribute(rSet));
809 const attribute::SdrGlowAttribute 
aGlow(createNewSdrGlowAttribute(rSet));
>>> CID 1618704:  Null po

New Defects reported by Coverity Scan for LibreOffice

2024-08-27 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
56 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 4 of 4 defect(s)


** CID 1618667:  Uninitialized members  (UNINIT_CTOR)
/package/source/zipapi/Inflater.cxx: 162 in 
ZipUtils::InflaterBytes::InflaterBytes(bool)()



*** CID 1618667:  Uninitialized members  (UNINIT_CTOR)
/package/source/zipapi/Inflater.cxx: 162 in 
ZipUtils::InflaterBytes::InflaterBytes(bool)()
156 case Z_STREAM_ERROR:
157 pStream.reset();
158 break;
159 default:
160 break;
161 }
>>> CID 1618667:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "sInBuffer" is not initialized in this 
>>> constructor nor in any functions that it calls.
162 }
163 
164 InflaterBytes::~InflaterBytes()
165 {
166 end();
167 }

** CID 1618666:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/sw/inc/contentindex.hxx: 47 in ()



*** CID 1618666:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/sw/inc/contentindex.hxx: 47 in ()
41 public:
42 virtual ~ISwContentIndexOwner();
43 virtual SwContentIndexOwnerType GetOwnerType() const = 0;
44 };
45 
46 /// Marks a character position inside a document model content node 
(SwContentNode)
>>> CID 1618666:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
>>> Class "SwContentIndex" may benefit from adding a move assignment 
>>> operator. See other events which show the copy assignment operator being 
>>> applied to rvalues, where a move assignment may be faster.
47 class SAL_WARN_UNUSED SW_DLLPUBLIC SwContentIndex
48 {
49 private:
50 friend class SwContentIndexReg;
51 
52 sal_Int32 m_nIndex;

** CID 1618665:  Memory - illegal accesses  (UNINIT)



*** CID 1618665:  Memory - illegal accesses  (UNINIT)
/sfx2/source/control/thumbnailviewacc.cxx: 518 in 
ThumbnailViewAcc::FireAccessibleEvent(short, const com::sun::star::uno::Any &, 
const com::sun::star::uno::Any &)()
512 {
513 if( !nEventId )
514 return;
515 
516 std::unique_lock aGuard(m_aMutex);
517 ::std::vector< uno::Reference< 
accessibility::XAccessibleEventListener > > aTmpListeners( mxEventListeners );
>>> CID 1618665:  Memory - illegal accesses  (UNINIT)
>>> Using uninitialized value "aGuard._M_owns" when calling "unlock".
518 aGuard.unlock();
519 accessibility::AccessibleEventObject aEvtObject;
520 
521 aEvtObject.EventId = nEventId;
522 aEvtObject.Source = getXWeak();
523 aEvtObject.NewValue = rNewValue;

** CID 1618664:  Incorrect expression  (NO_EFFECT)
/package/source/zipapi/ZipFile.cxx: 1622 in ZipFile::HandlePK34(std::span, long, long)()



*** CID 1618664:  Incorrect expression  (NO_EFFECT)
/package/source/zipapi/ZipFile.cxx: 1622 in ZipFile::HandlePK34(std::span, long, long)()
1616 {
1617 std::vector aFileName(aEntry.nPathLen);
1618 aGrabber.seek(dataOffset + 30);
1619 aGrabber.readBytes(aFileName.data(), aEntry.nPathLen);
1620 aEntry.sPath = OUString(reinterpret_cast(aFileName.data()),
1621 aEntry.nPathLen, 
RTL_TEXTENCODING_UTF8);
>>> CID 1618664:  Incorrect expression  (NO_EFFECT)
>>> Assigning "aEntry.nPathLen" to itself has no effect.
1622 aEntry.nPathLen = aEntry.nPathLen;
1623 }
1624 aEntry.sPath = aEntry.sPath.replace('\\', '/');
1625 
1626 // read 64bit header
1627 if (aEntry.nExtraLen > 0)



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DbhbR_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtPbme9l4-2FPCi-2BNJjZgRSZiN8yXvcR1CWZOotVP5v2aIMwvZrVQFny8g4SHK-2BOuUKqGCjJMKpMT4B7AkI4UpFDyYjkUUE991mLlHXJ1-2FfFGpOorVShaRffkx3pHbtkibGTNbISbXvL4cRxsGGt206-2BpvsDtJ-2BBjy8oskB5L11NBl8-3D



New Defects reported by Coverity Scan for LibreOffice

2024-08-25 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
4 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 1 of 1 defect(s)


** CID 1618310:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx: 120 in 
drawinglayer::primitive2d::WrongSpellPrimitive2D::create2DDecomposition(const 
drawinglayer::geometry::ViewInformation2D &) const()



*** CID 1618310:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx: 120 in 
drawinglayer::primitive2d::WrongSpellPrimitive2D::create2DDecomposition(const 
drawinglayer::geometry::ViewInformation2D &) const()
114 aRest.getControlPointB(),
115 aRest.getEndPoint());
116 }
117 
118 // create & return primitive
119 return new PolygonHairlinePrimitive2D(
>>> CID 1618310:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aWave" is passed-by-value as parameter to 
>>> "drawinglayer::primitive2d::PolygonHairlinePrimitive2D::PolygonHairlinePrimitive2D(basegfx::B2DPolygon,
>>>  basegfx::BColor const &)" when it could be moved instead.
120 aWave,
121 getColor());
122 }
123 
124 WrongSpellPrimitive2D::WrongSpellPrimitive2D(
125 basegfx::B2DHomMatrix aTransformation,



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DI8f1_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGthpPQP9mfiIdxKmqJGWqTMzo9TxmN9C3r8cfMS2OWUDApLlOzabPwmFhNW5wZ1sxxa7u-2FnOuyIHKunUsN0A80UOq8TFxr8pk0jlAyNaOkPDALkY16oBKQ-2BobWgWeROU03V4ZFvBcVm7o25azfcoodGGRcapjyBsruUN0MZmryFFU-3D



New Defects reported by Coverity Scan for LibreOffice

2024-08-23 Thread scan-admin
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.
14 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 2 of 2 defect(s)


** CID 1616925:  Integer handling issues  (SIGN_EXTENSION)
/hwpfilter/source/hgzip.cxx: 265 in getLongEquals(gz_stream *, unsigned long)()



*** CID 1616925:  Integer handling issues  (SIGN_EXTENSION)
/hwpfilter/source/hgzip.cxx: 265 in getLongEquals(gz_stream *, unsigned long)()
259 */
260 static bool getLongEquals(gz_stream* s, uLong val)
261 {
262 uLong x = get_byte(s);
263 x += get_byte(s) << 8;
264 x += get_byte(s) << 16;
>>> CID 1616925:  Integer handling issues  (SIGN_EXTENSION)
>>> Suspicious implicit sign extension: "get_byte(s)" with type "unsigned 
>>> char" (8 bits, unsigned) is promoted in "get_byte(s) << 24" to type "int" 
>>> (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, 
>>> unsigned).  If "get_byte(s) << 24" is greater than 0x7FFF, the upper 
>>> bits of the result will all be 1.
265 x += get_byte(s) << 24;
266 if (s->z_eof)
267 {
268 s->z_err = Z_DATA_ERROR;
269 return false;
270 }

** CID 1616924:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx: 244 in 
writerfilter::dmapper::DomainMapperTableManager::sprm(writerfilter::Sprm &)()



*** CID 1616924:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx: 244 in 
writerfilter::dmapper::DomainMapperTableManager::sprm(writerfilter::Sprm &)()
238 insertRowProps(pPropMap);
239 }
240 break;
241 case NS_ooxml::LN_CT_TblPrBase_tblStyle: //table style name
242 {
243 TablePropertyMapPtr pPropMap( new TablePropertyMap );
>>> CID 1616924:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pValue" to "getString", which dereferences it. 
>>> (The dereference happens because this is a virtual function call.)
244 pPropMap->Insert( META_PROP_TABLE_STYLE_NAME, uno::Any( 
pValue->getString() ));
245 insertTableProps(pPropMap);
246 }
247 break;
248 case NS_ooxml::LN_CT_TblGridBase_gridCol:
249 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DlyYU_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtLiqXn0Yxh0pmkvQKgsMFbMDPqANLpKdrP8yWgPgqO5cJPMEwg7ar-2BdxtB5FPibFpkAis95mrin-2FNEms04FbSKp7mBe5Jbk6ah1L13PxwnmDAm8vqx5eMF4d6O2PyBOX0CBZuTIvP46RbIqkH3sQZxgg3LRuCgwbBwZTkwWKiNgc-3D



New Defects reported by Coverity Scan for LibreOffice

2024-08-19 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
29 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 1 of 1 defect(s)


** CID 1616902:  Integer handling issues  (NO_EFFECT)
/vcl/source/treelist/treelist.cxx: 435 in 
SvTreeList::GetVisibleChildCount(const SvListView *, SvTreeListEntry *) const()



*** CID 1616902:  Integer handling issues  (NO_EFFECT)
/vcl/source/treelist/treelist.cxx: 435 in 
SvTreeList::GetVisibleChildCount(const SvListView *, SvTreeListEntry *) const()
429 do
430 {
431 pParent = NextVisible( pView, pParent, &nActDepth );
432 nCount++;
433 } while( pParent && nRefDepth < nActDepth );
434 nCount--;
>>> CID 1616902:  Integer handling issues  (NO_EFFECT)
>>> This greater-than-or-equal-to-zero comparison of an unsigned value is 
>>> always true. "nCount >= 0U".
435 assert(nCount >= 0 && "given do...while");
436 return nCount;
437 }
438 
439 sal_uInt32 SvTreeList::GetChildSelectionCount(const SvListView* 
pView,SvTreeListEntry* pParent) const
440 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3Ds_ie_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtwewpryqyIrpxvf5vt50AhYmgviiae1LBmMr6VrIuPJMriFFnGN0867BGNaokm3Hot0AhHef9ZVDfVfHYhEKyxMifUh0PkqvHZ6LIg-2BzCdzCCHj4doix3GY3GviN3G0DAXGTp0bCHZlbUUja9WfvhYCB6xOeX5TAuxooA1zZq638-3D



New Defects reported by Coverity Scan for LibreOffice

2024-08-18 Thread scan-admin
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.
48 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 2 of 2 defect(s)


** CID 1616525:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sd/source/ui/func/fuoaprms.cxx: 451 in 
sd::FuObjectAnimationParameters::DoExecute(SfxRequest &)()



*** CID 1616525:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sd/source/ui/func/fuoaprms.cxx: 451 in 
sd::FuObjectAnimationParameters::DoExecute(SfxRequest &)()
445 std::shared_ptr xRequest = 
std::make_shared(rReq);
446 rReq.Ignore(); // the 'old' request is not relevant any more
447 
448 SdAbstractDialogFactory* pFact = 
SdAbstractDialogFactory::Create();
449 VclPtr pDlg( 
pFact->CreatSdActionDialog(mpViewShell->GetFrameWeld(), &*aSet, mpView) );
450 rtl::Reference xThis( this ); // 
avoid destruction within async processing
>>> CID 1616525:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "xRequest" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
451 pDlg->StartExecuteAsync([pDlg, xThis, xRequest, aSet](sal_Int32 
nResult){
452 if (nResult == RET_OK) {
453 xThis->Finish(xRequest, pDlg);
454 }
455 pDlg->disposeOnce();
456 });

** CID 1616524:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sd/source/ui/func/fuoaprms.cxx: 451 in 
sd::FuObjectAnimationParameters::DoExecute(SfxRequest &)()



*** CID 1616524:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sd/source/ui/func/fuoaprms.cxx: 451 in 
sd::FuObjectAnimationParameters::DoExecute(SfxRequest &)()
445 std::shared_ptr xRequest = 
std::make_shared(rReq);
446 rReq.Ignore(); // the 'old' request is not relevant any more
447 
448 SdAbstractDialogFactory* pFact = 
SdAbstractDialogFactory::Create();
449 VclPtr pDlg( 
pFact->CreatSdActionDialog(mpViewShell->GetFrameWeld(), &*aSet, mpView) );
450 rtl::Reference xThis( this ); // 
avoid destruction within async processing
>>> CID 1616524:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aSet" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
451 pDlg->StartExecuteAsync([pDlg, xThis, xRequest, aSet](sal_Int32 
nResult){
452 if (nResult == RET_OK) {
453 xThis->Finish(xRequest, pDlg);
454 }
455 pDlg->disposeOnce();
456 });



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DhTOZ_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtnqWXxPXlLn3YNI6iNrL3K7kAeNm13n8RFXsarRkF86pJM0s6aEnlRNwVifqz5yyT-2BK5Ull2I1gbCLA3pxB-2FU3czg7-2FgoR8F5gJZreU18fXo2bJp89U-2BbVP8xZyjJlwDijOhfhg9LF7-2F-2FBxKcm-2BH8mT5SOBxy3rcw5LjdfkshJko-3D



New Defects reported by Coverity Scan for LibreOffice

2024-08-16 Thread scan-admin
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.
59 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 1616507:  Incorrect expression  (ASSERT_SIDE_EFFECT)
/sw/source/core/doc/textboxhelper.cxx: 68 in 
SwTextBoxHelper::create(SwFrameFormat *, SdrObject *, bool)()



*** CID 1616507:  Incorrect expression  (ASSERT_SIDE_EFFECT)
/sw/source/core/doc/textboxhelper.cxx: 68 in 
SwTextBoxHelper::create(SwFrameFormat *, SdrObject *, bool)()
62 using namespace com::sun::star;
63 
64 void SwTextBoxHelper::create(SwFrameFormat* pShape, SdrObject* pObject, 
bool bCopyText)
65 {
66 assert(pShape);
67 assert(pObject);
>>> CID 1616507:  Incorrect expression  (ASSERT_SIDE_EFFECT)
>>> Assignment "pShape = FindFrameFormat(pObject)" has a side effect.  This 
>>> code will work differently in a non-debug build.
68 assert(pShape = ::FindFrameFormat(pObject));
69 
70 // If TextBox wasn't enabled previously
71 if (pShape->GetOtherTextBoxFormats() && 
pShape->GetOtherTextBoxFormats()->GetTextBox(pObject))
72 return;
73 

** CID 1616506:  Resource leaks  (RESOURCE_LEAK)
/sc/source/ui/condformat/condformateasydlg.cxx: 390 in 
sc::ConditionalFormatEasyDialog::ButtonPressed(weld::Button &)()



*** CID 1616506:  Resource leaks  (RESOURCE_LEAK)
/sc/source/ui/condformat/condformateasydlg.cxx: 390 in 
sc::ConditionalFormatEasyDialog::ButtonPressed(weld::Button &)()
384 pFormat->SetRange(aRange);
385 auto& rRangeList = pFormat->GetRange();
386 
mpViewData->GetDocShell()->GetDocFunc().ReplaceConditionalFormat(
387 0, std::move(pFormat), maPosition.Tab(), rRangeList);
388 }
389 m_xDialog->response(RET_OK);
>>> CID 1616506:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pEntry" going out of scope leaks the storage it points to.
390 }
391 else if (&rButton == mxButtonCancel.get())
392 m_xDialog->response(RET_CANCEL);
393 }
394 
395 IMPL_LINK_NOARG(ConditionalFormatEasyDialog, StyleSelectHdl, 
weld::ComboBox&, void)

** CID 1616505:(UNINIT_CTOR)
/sc/source/ui/condformat/condformateasydlg.cxx: 277 in 
sc::ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings *, 
SfxChildWindow *, weld::Window *, ScViewData *)()
/sc/source/ui/condformat/condformateasydlg.cxx: 277 in 
sc::ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings *, 
SfxChildWindow *, weld::Window *, ScViewData *)()



*** CID 1616505:(UNINIT_CTOR)
/sc/source/ui/condformat/condformateasydlg.cxx: 277 in 
sc::ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings *, 
SfxChildWindow *, weld::Window *, ScViewData *)()
271 
272 StartListening(*mpDocument->GetStyleSheetPool(), 
DuplicateHandling::Prevent);
273 ScCondFormatHelper::FillStyleListBox(mpDocument, *mxStyles);
274 
275 mxStyles->set_active(1);
276 mxWdPreviewWin->show();
>>> CID 1616505:(UNINIT_CTOR)
>>> Non-static class member "mnEntryIndex" is not initialized in this 
>>> constructor nor in any functions that it calls.
277 }
278 
279 ConditionalFormatEasyDialog::~ConditionalFormatEasyDialog()
280 {
281 if (mbIsManaged)
282 {
/sc/source/ui/condformat/condformateasydlg.cxx: 277 in 
sc::ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings *, 
SfxChildWindow *, weld::Window *, ScViewData *)()
271 
272 StartListening(*mpDocument->GetStyleSheetPool(), 
DuplicateHandling::Prevent);
273 ScCondFormatHelper::FillStyleListBox(mpDocument, *mxStyles);
274 
275 mxStyles->set_active(1);
276 mxWdPreviewWin->show();
>>> CID 1616505:(UNINIT_CTOR)
>>> Non-static class member "mnEntryIndex" is not initialized in this 
>>> constructor nor in any functions that it calls.
277 }
278 
279 ConditionalFormatEasyDialog::~ConditionalFormatEasyDialog()
280 {
281 if (mbIsManaged)
282 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DDXpT_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWo

New Defects reported by Coverity Scan for LibreOffice

2024-08-15 Thread scan-admin
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.
38 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 1616499:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/textlayoutdevice.cxx: 415 in 
drawinglayer::primitive2d::TextLayouterDevice::createEmphasisMarks(SalLayout &, 
drawinglayer::primitive2d::TextEmphasisMark, bool, std::function) const()



*** CID 1616499:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/textlayoutdevice.cxx: 415 in 
drawinglayer::primitive2d::TextLayouterDevice::createEmphasisMarks(SalLayout &, 
drawinglayer::primitive2d::TextEmphasisMark, bool, std::function) const()
409 if (bAbove)
410 nEmphasisMark |= FontEmphasisMark::PosAbove;
411 else
412 nEmphasisMark |= FontEmphasisMark::PosBelow;
413 
414 mrDevice.createEmphasisMarks(nEmphasisMark, 
static_cast(fEmphasisHeight),
>>> CID 1616499:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aCallback" is passed-by-value as parameter to "createEmphasisMarks" 
>>> when it could be moved instead.
415  rSalLayout, aCallback);
416 }
417 
418 // helper methods for vcl font handling
419 
420 vcl::Font getVclFontFromFontAttribute(const attribute::FontAttribute& 
rFontAttribute,

** CID 1616498:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/comphelper/source/misc/lok.cxx: 323 in 
comphelper::LibreOfficeKit::setAnyInputCallback(std::function, 
void *)()



*** CID 1616498:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/comphelper/source/misc/lok.cxx: 323 in 
comphelper::LibreOfficeKit::setAnyInputCallback(std::function, 
void *)()
317 if (pStatusIndicatorCallback)
318 pStatusIndicatorCallback(pStatusIndicatorCallbackData, 
statusIndicatorCallbackType::Finish, 0, nullptr);
319 }
320 
321 void setAnyInputCallback(std::function pAnyInputCallback, 
void* pData)
322 {
>>> CID 1616498:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "pAnyInputCallback" is copied in a call to copy assignment "operator 
>>> =", when it could be moved instead.
323 g_pAnyInputCallback = pAnyInputCallback;
324 g_pAnyInputCallbackData = pData;
325 }
326 
327 bool anyInput()
328 {

** CID 1613648:  Resource leaks  (CTOR_DTOR_LEAK)



*** CID 1613648:  Resource leaks  (CTOR_DTOR_LEAK)
/usr/include/c++/12/bits/hashtable.h: 568 in std::_Hashtable::RTFSymbol>, 
std::allocator::RTFSymbol>>, std::__detail::_Select1st, 
std::equal_to, std::hash, 
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, 
std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<(bool)1, 
(bool)0, (bool)1>>::_Hashtable::RTFSymbol> *>(T1, T1, unsigned long, const 
std::hash &, const std::equal_to &, const 
std::allocator::RTFSymbol>>&)()
562   template
563 _Hashtable(_InputIterator __f, _InputIterator __l,
564size_type __bkt_count_hint = 0,
565const _Hash& __hf = _Hash(),
566const key_equal& __eql = key_equal(),
567const allocator_type& __a = allocator_type())
>>> CID 1613648:  Resource leaks  (CTOR_DTOR_LEAK)
>>> Calling allocation function "_Hashtable".
568 : _Hashtable(__f, __l, __bkt_count_hint, __hf, __eql, __a,
569  __unique_keys{})
570 { }
571 
572   _Hashtable(initializer_list __l,
573  size_type __bkt_count_hint = 0,



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DsaSs_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtQfSXgZlkkIU3big02c7mc4dh-2BTVgYIzjAYX-2Bjly6KpzjRKHWUg-2BglCkOO4nPrtKi1ihx3-2Ff4GrRWfzuuqNwaBE0bbXrbY2WotRgUdqikKBm5i0ZxA0I9GGiBSduhxM7cv5ViodKTSuCSgQFfQ3eSmLnVi98i9nAC2bVVFuRS86U-3D



New Defects reported by Coverity Scan for LibreOffice

2024-08-12 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
57 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 1 of 1 defect(s)


** CID 1616198:  API usage errors  (SWAPPED_ARGUMENTS)



*** CID 1616198:  API usage errors  (SWAPPED_ARGUMENTS)
/vcl/source/window/printdlg.cxx: 862 in vcl::PrintDialog::setPaperSizes()()
856 {
857 int nExactMatch = -1;
858 int nSizeMatch = -1;
859 int nRotatedSizeMatch = -1;
860 Size aSizeOfPaper = aPrt->GetSizeOfPaper();
861 PaperInfo aPaperInfo(aSizeOfPaper.getWidth(), 
aSizeOfPaper.getHeight());
>>> CID 1616198:  API usage errors  (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the constructor for "PaperInfo" do not 
>>> match the ordering of the parameters:
* "aSizeOfPaper.getHeight()" is passed to "nPaperWidth".
* "aSizeOfPaper.getWidth()" is passed to "nPaperHeight".
862 PaperInfo aRotatedPaperInfo(aSizeOfPaper.getHeight(), 
aSizeOfPaper.getWidth());
863 const LocaleDataWrapper& 
rLocWrap(Application::GetSettings().GetLocaleDataWrapper());
864 o3tl::Length eUnit = o3tl::Length::mm;
865 int nDigits = 0;
866 if( rLocWrap.getMeasurementSystemEnum() == 
MeasurementSystem::US )
867 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DJH9W_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGt3GmZAipN77JcHWApEiH3D-2F1Y5ovpTMCn9CFmgxADMGEYZF9RpUnAtkBcEGxZRi1ndVim-2Fv23uozKqlWgvLu2bEhjF4RzSAl57QXv2GY53KftJJVRnUSNaytSM1e4L57f2UFoV-2Fc87HXnrnX-2B0b-2Bo-2Bk0PK4OH5uTytQZpBirjChk-3D



New Defects reported by Coverity Scan for LibreOffice

2024-08-08 Thread scan-admin
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.
29 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 2 of 2 defect(s)


** CID 1616089:(COPY_INSTEAD_OF_MOVE)
/sd/source/ui/func/fupage.cxx: 353 in 
sd::FuPage::ExecuteAsyncDialog(weld::Window *, const SfxRequest &)()
/sd/source/ui/func/fupage.cxx: 342 in 
sd::FuPage::ExecuteAsyncDialog(weld::Window *, const SfxRequest &)()



*** CID 1616089:(COPY_INSTEAD_OF_MOVE)
/sd/source/ui/func/fupage.cxx: 353 in 
sd::FuPage::ExecuteAsyncDialog(weld::Window *, const SfxRequest &)()
347 
348 // create the dialog and start async execution
349 SdAbstractDialogFactory* pFact = 
SdAbstractDialogFactory::Create();
350 VclPtr xDlg( 
pFact->CreateSdTabPageDialog(mpViewShell->GetFrameWeld(),
351aMergedAttr.get(), mpDocSh, 
mbDisplayBackgroundTabPage, bIsImpressDoc) );
352 rtl::Reference xThis( this ); // avoid destruction 
within async processing
>>> CID 1616089:(COPY_INSTEAD_OF_MOVE)
>>> "aNewAttr" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
353 xDlg->StartExecuteAsync([xDlg, xThis, pStyleSheet, aNewAttr, 
aMergedAttr](sal_Int32 nResult) {
354 if (nResult == RET_OK && pStyleSheet) {
355 SfxItemSet tempSet(*xDlg->GetOutputItemSet());
356 xThis->ApplyItemSet(*pStyleSheet, aNewAttr, tempSet, 
aMergedAttr);
357 }
358 xDlg->disposeOnce();
/sd/source/ui/func/fupage.cxx: 342 in 
sd::FuPage::ExecuteAsyncDialog(weld::Window *, const SfxRequest &)()
336 aMigrateSet.Put(XFillBitmapItem(u"background"_ustr, 
std::move(aGraphic)));
337 SdrModel::MigrateItemSet( &aMigrateSet, &tempSet, *mpDoc );
338 
339 tempSet.Put( XFillBmpStretchItem( true ));
340 tempSet.Put( XFillBmpTileItem( false ));
341 if( pStyleSheet ) {
>>> CID 1616089:(COPY_INSTEAD_OF_MOVE)
>>> "aNewAttr" is passed-by-value as parameter to "ApplyItemSet" when it 
>>> could be moved instead.
342 ApplyItemSet(*pStyleSheet, aNewAttr, tempSet, 
aMergedAttr);
343 }
344 }
345 } else {
346 bool bIsImpressDoc = 
mpDrawViewShell->GetDoc()->GetDocumentType() == DocumentType::Impress;
347 

** CID 1616088:(COPY_INSTEAD_OF_MOVE)
/sd/source/ui/func/fupage.cxx: 342 in 
sd::FuPage::ExecuteAsyncDialog(weld::Window *, const SfxRequest &)()
/sd/source/ui/func/fupage.cxx: 353 in 
sd::FuPage::ExecuteAsyncDialog(weld::Window *, const SfxRequest &)()



*** CID 1616088:(COPY_INSTEAD_OF_MOVE)
/sd/source/ui/func/fupage.cxx: 342 in 
sd::FuPage::ExecuteAsyncDialog(weld::Window *, const SfxRequest &)()
336 aMigrateSet.Put(XFillBitmapItem(u"background"_ustr, 
std::move(aGraphic)));
337 SdrModel::MigrateItemSet( &aMigrateSet, &tempSet, *mpDoc );
338 
339 tempSet.Put( XFillBmpStretchItem( true ));
340 tempSet.Put( XFillBmpTileItem( false ));
341 if( pStyleSheet ) {
>>> CID 1616088:(COPY_INSTEAD_OF_MOVE)
>>> "aMergedAttr" is passed-by-value as parameter to "ApplyItemSet" when it 
>>> could be moved instead.
342 ApplyItemSet(*pStyleSheet, aNewAttr, tempSet, 
aMergedAttr);
343 }
344 }
345 } else {
346 bool bIsImpressDoc = 
mpDrawViewShell->GetDoc()->GetDocumentType() == DocumentType::Impress;
347 
/sd/source/ui/func/fupage.cxx: 353 in 
sd::FuPage::ExecuteAsyncDialog(weld::Window *, const SfxRequest &)()
347 
348 // create the dialog and start async execution
349 SdAbstractDialogFactory* pFact = 
SdAbstractDialogFactory::Create();
350 VclPtr xDlg( 
pFact->CreateSdTabPageDialog(mpViewShell->GetFrameWeld(),
351aMergedAttr.get(), mpDocSh, 
mbDisplayBackgroundTabPage, bIsImpressDoc) );
352 rtl::Reference xThis( this ); // avoid destruction 
within async processing
>>> CID 1616088:(COPY_INSTEAD_OF_MOVE)
>>> "aMergedAttr" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
353 xDlg->StartExecuteAsync([xDlg, xThis, pStyleSheet, aNewAttr, 
aMergedAttr](sal_Int32 nResult) {
354 if (nResult == RET_OK && pStyleSheet) {
355 SfxItemSet tem

New Defects reported by Coverity Scan for LibreOffice

2024-08-06 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

6 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 6 of 6 defect(s)


** CID 1616075:  Sigma  (SIGMA.xml_external_entity_enabled)
/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java:
 73 in 
org.openoffice.xmerge.converter.xml.xslt.DocumentSerializerImpl::makeFactory()DocumentBuilderFactory()



*** CID 1616075:  Sigma  (SIGMA.xml_external_entity_enabled)
/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java:
 73 in 
org.openoffice.xmerge.converter.xml.xslt.DocumentSerializerImpl::makeFactory()DocumentBuilderFactory()
67 /** SXW {@code Document} object that this converter processes. */
68 private final GenericOfficeDocument sxwDoc;
69 
70 private final PluginFactoryImpl pluginFactory;
71 
72 private static DocumentBuilderFactory makeFactory() {
>>> CID 1616075:  Sigma  (SIGMA.xml_external_entity_enabled)
>>> Java API for XML processing's `DocumentBuilderFactory` or 
>>> `SAXParserFactory` class has not been configured to prevent expansion of 
>>> external entities during XML parsing. External entity expansion may cause a 
>>> server-side request forgery, denial of service, exposure of sensitive data 
>>> or unwanted server requests.
73 DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
74 
75 String[] featuresToDisable = {
76 
"https://u15810271.ct.sendgrid.net/ls/click?upn=u001.flnyKa-2FqvaKqx4fLQsH4bWEp9-2Bcx5oE7sxbHBs0-2F-2BfBjOeAeDPsYG9nynjqF9K3z6KYyOfuOMD1VUBS3epvdAeb8hPgk4-2F4qMnMyJvhywrQ-3DKqcc_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtEctlXvROnbtLVjfE917VN7qr5KOsMXsBrS95xmxLqjhCeaz2nB0Pb-2Ft5OTVcPSToYOwBm7mGF-2BHqx64vU2UUoo6AVX9ev5eI2HnpTXvSzAb8FySSBPLsf51SkzPeBQUdx8WGH1vKmyMfl7qK46CKMZlZ0mxwmcxYUApEBXPjHTc-3D
77 
"https://u15810271.ct.sendgrid.net/ls/click?upn=u001.flnyKa-2FqvaKqx4fLQsH4bWEp9-2Bcx5oE7sxbHBs0-2F-2BfAPoXPnnX-2BTTEurhU1xaSl4MtTRu8aPbxPStTMqpf5YIeo6HzcAkTF4vMhq8Ns-2B840-3DQySv_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtEctlXvROnbtLVjfE917VNyla3GmgItuFVvqEXudo7Wm44TGSfh1RF70x9HeiiVXAe-2FWwvLmX3DqehJhJ7BdHr0U2y7fBh02xn0XNfi86zq7esUfaCxU0h5cr0-2BDMq9vsSMQpPtF596o-2F5R0O1E56v6xuGTNHhMWam9idBYeOgdc-3D
78 
"https://u15810271.ct.sendgrid.net/ls/click?upn=u001.flnyKa-2FqvaKqx4fLQsH4bds-2FqVEBhA4KrcWpyt0ORNsdFvFDwfN-2BgKmx4SsmCqlJr-2FHobFE8Pc-2BW0CFg5dzIk6ZGXD7wJXNuxBHm14w-2BCkA-3DsXHy_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtEctlXvROnbtLVjfE917VN3jAfX9l8AXiRcgPrev3ECCmfqwpEz-2FIEHMlfuGggRdEB0mQE4FXWkncb95-2Fupx8o-2BICzJjTjmjoDoabGCrpvQlYSbIR0N1oYoUsOgamS7bo-2FiGE5JuWpyyBLJ-2F6X992TuGISn-2BOKyAlStW4qXhMQgg-3D

** CID 1616074:  Sigma  (SIGMA.xml_external_entity_enabled)
/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java:
 48 in 
org.openoffice.xmerge.converter.dom.DOMDocument::makeFactory()DocumentBuilderFactory()



*** CID 1616074:  Sigma  (SIGMA.xml_external_entity_enabled)
/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java:
 48 in 
org.openoffice.xmerge.converter.dom.DOMDocument::makeFactory()DocumentBuilderFactory()
42  * An implementation of {@code Document} for StarOffice documents.
43  */
44 public class DOMDocument
45 implements org.openoffice.xmerge.Document {
46 
47 private static DocumentBuilderFactory makeFactory() {
>>> CID 1616074:  Sigma  (SIGMA.xml_external_entity_enabled)
>>> Java API for XML processing's `DocumentBuilderFactory` or 
>>> `SAXParserFactory` class has not been configured to prevent expansion of 
>>> external entities during XML parsing. External entity expansion may cause a 
>>> server-side request forgery, denial of service, exposure of sensitive data 
>>> or unwanted server requests.
48 DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
49 
50 String[] featuresToDisable = {
51 
"https://u15810271.ct.sendgrid.net/ls/click?upn=u001.flnyKa-2FqvaKqx4fLQsH4bWEp9-2Bcx5oE7sxbHBs0-2F-2BfBjOeAeDPsYG9nynjqF9K3z6KYyOfuOMD1VUBS3epvdAeb8hPgk4-2F4qMnMyJvhywrQ-3DbQkd_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtEctlXvROnbtLVjfE917VN-2FRgz3329bMv40YptPL7WCylRLFVw5693Zm4SjPEU6TUwVTT-2FFVEux8R0N-2BGMGx6EqYWugc0DJGElFh9NVW0R2J0F1ly3C4m50XbMKB8PN1v0cFnKQMLsRqBuOMTb-2FFaMINNq8zRoqLGe-2FD9fO-2FYkdo-3D
52 
"htt

New Defects reported by Coverity Scan for LibreOffice

2024-08-04 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

9 new defect(s) introduced to LibreOffice found with Coverity Scan.
53 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 9 of 9 defect(s)


** CID 1616050:  Memory - corruptions  (MISMATCHED_ITERATOR)
/usr/include/c++/12/bits/erase_if.h: 61 in 
std::__detail::__erase_nodes_if>, 
std::set>, ScGridWindow::LaunchDataSelectMenu(short, 
int)::[lambda(const ScTypedStrData &) (instance 1)]>(T1&, T2 &, T3)()



*** CID 1616050:  Memory - corruptions  (MISMATCHED_ITERATOR)
/usr/include/c++/12/bits/erase_if.h: 61 in 
std::__detail::__erase_nodes_if>, 
std::set>, ScGridWindow::LaunchDataSelectMenu(short, 
int)::[lambda(const ScTypedStrData &) (instance 1)]>(T1&, T2 &, T3)()
55  typename _Container::size_type __num = 0;
56  for (auto __iter = __ucont.begin(), __last = __ucont.end();
57   __iter != __last;)
58{
59  if (__pred(*__iter))
60{
>>> CID 1616050:  Memory - corruptions  (MISMATCHED_ITERATOR)
>>> Using iterator "__iter" from "__ucont" with "__cont".
61  __iter = __cont.erase(__iter);
62  ++__num;
63}
64  else
65++__iter;
66}

** CID 1616049:  Performance inefficiencies  (AUTO_CAUSES_COPY)
/sw/source/core/doc/docbm.cxx: 1514 in 
sw::mark::MarkManager::getInnerFieldmarkFor(const SwPosition &) const()



*** CID 1616049:  Performance inefficiencies  (AUTO_CAUSES_COPY)
/sw/source/core/doc/docbm.cxx: 1514 in 
sw::mark::MarkManager::getInnerFieldmarkFor(const SwPosition &) const()
1508 {
1509 if((*itCurrent)->GetMarkStart() < aMarkStart)
1510 // any following mark (in reverse order) will have an 
earlier
1511 // start and thus can not be more 'inner' than our 
previous
1512 // match, so we are done.
1513 break;
>>> CID 1616049:  Performance inefficiencies  (AUTO_CAUSES_COPY)
>>> Using the "auto" keyword without an "&" causes the copy of an object of 
>>> type "SwPosition".
1514 auto aCurrentMarkEnd = (*itCurrent)->GetMarkEnd();
1515 if(rPos < aCurrentMarkEnd && aCurrentMarkEnd <= aMarkEnd)
1516 {
1517 // both covering the position and more inner/smaller 
=> use this one instead
1518 pMark = *itCurrent;
1519 aMarkEnd = aCurrentMarkEnd;

** CID 1616048:  Concurrent data access violations  (MISSING_LOCK)
/ucb/source/cacher/cachedcontentresultset.cxx: 681 in 
CachedContentResultSet::applyPositionToOrigin(std::unique_lock &, 
int)()



*** CID 1616048:  Concurrent data access violations  (MISSING_LOCK)
/ucb/source/cacher/cachedcontentresultset.cxx: 681 in 
CachedContentResultSet::applyPositionToOrigin(std::unique_lock &, 
int)()
675 return false;
676 }
677 //  OSL_ENSURE( nRow <= m_nKnownCount, "don't step into regions you 
don't know with this method" );
678 
679 sal_Int32 nLastAppliedPos = m_nLastAppliedPos;
680 bool bAfterLastApplied = m_bAfterLastApplied;
>>> CID 1616048:  Concurrent data access violations  (MISSING_LOCK)
>>> Accessing "this->m_bAfterLast" without holding lock 
>>> "ContentResultSetWrapper.m_aMutex". Elsewhere, 
>>> "CachedContentResultSet.m_bAfterLast" is written to with 
>>> "ContentResultSetWrapper.m_aMutex" held 24 out of 24 times.
681 bool bAfterLast = m_bAfterLast;
682 sal_Int32 nForwardOnly = m_nForwardOnly;
683 
684 rGuard.unlock();
685 
686 if( bAfterLastApplied || nLastAppliedPos != nRow )

** CID 1616047:  Concurrent data access violations  (MISSING_LOCK)
/ucb/source/cacher/contentresultsetwrapper.cxx: 125 in 
ContentResultSetWrapper::impl_notifyPropertyChangeListeners(std::unique_lock
 &, const com::sun::star::beans::PropertyChangeEvent &)()



*** CID 1616047:  Concurrent data access violations  (MISSING_LOCK)
/ucb/source/cacher/contentresultsetwrapper.cxx: 125 in 
ContentResultSetWrapper::impl_notifyPropertyChangeListeners(std::unique_lock
 &, const com::sun::star::beans::PropertyChangeEvent &)()
119 throw DisposedException();
120 }
121 
122 void ContentResultSetWrapper::impl_notifyPropertyChangeListeners( 
std::unique_lock& rGuard, const PropertyChangeEvent& rEvt )
123 {
124 // Notify listeners interested 

New Defects reported by Coverity Scan for LibreOffice

2024-07-31 Thread scan-admin
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.
67 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 2 of 2 defect(s)


** CID 1615991:  Control flow issues  (DEADCODE)
/cui/source/tabpages/numfmt.cxx: 428 in SvxNumberFormatTabPage::Reset(const 
SfxItemSet *)()



*** CID 1615991:  Control flow issues  (DEADCODE)
/cui/source/tabpages/numfmt.cxx: 428 in SvxNumberFormatTabPage::Reset(const 
SfxItemSet *)()
422 
423 if ( const SfxBoolItem* pBoolItem = rSet->GetItemIfSet( 
SID_ATTR_NUMBERFORMAT_SOURCE ))
424 {
425 if ( pBoolItem )
426 m_xCbSourceFormat->set_active(pBoolItem->GetValue());
427 else
>>> CID 1615991:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "this->m_xCbSourceFormat->se...".
428 m_xCbSourceFormat->set_active( false );
429 m_xCbSourceFormat->set_sensitive(true);
430 m_xCbSourceFormat->show();
431 }
432 else
433 {

** CID 1615990:  Insecure data handling  (INTEGER_OVERFLOW)



*** CID 1615990:  Insecure data handling  (INTEGER_OVERFLOW)
/package/source/zipapi/ZipFile.cxx: 1310 in ZipFile::readCEN()()
1304 if (SAL_MAX_INT32 < nCenLen)
1305 {
1306 throw ZipException(u"central directory too big"_ustr);
1307 }
1308 
1309 aGrabber.seek(nCenPos);
>>> CID 1615990:  Insecure data handling  (INTEGER_OVERFLOW)
>>> "nCenLen", which might have overflowed, is passed to 
>>> "aCENBuffer.Sequence(nCenLen)".
1310 Sequence < sal_Int8 > aCENBuffer ( nCenLen );
1311 sal_Int64 nRead = aGrabber.readBytes ( aCENBuffer, nCenLen );
1312 if ( static_cast < sal_Int64 > ( nCenLen ) != nRead )
1313 throw ZipException (u"Error reading CEN into memory 
buffer!"_ustr );
1314 
1315 MemoryByteGrabber aMemGrabber(aCENBuffer);



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DS016_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtIVnvt-2B7kur9Ch0g1EgdB3AXj12SxxDneLvfA1yBDa-2Fc429TVTxBaj9ZP-2Fpr5DnQuhSKZ-2F6OAKwTZB-2FO5bLtBSLecQCu1hKWkuPHLVJSKugdygXkqqUGTZCQTCXMLx8-2FP1Ucx8kKYkZlHiAe1qB4jjYPyRgIlNWXDETCkMAA55Lc-3D



New Defects reported by Coverity Scan for LibreOffice

2024-07-28 Thread scan-admin
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.
39 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 2 of 2 defect(s)


** CID 1615230:  Integer handling issues  (INTEGER_OVERFLOW)
/ucb/source/ucp/webdav-curl/CurlSession.cxx: 545 in 
http_dav_ucp::ProcessHeaders(const std::vector> &)()



*** CID 1615230:  Integer handling issues  (INTEGER_OVERFLOW)
/ucb/source/ucp/webdav-curl/CurlSession.cxx: 545 in 
http_dav_ucp::ProcessHeaders(const std::vector> &)()
539 SAL_WARN("ucb.ucp.webdav.curl", "invalid header field 
(empty name)");
540 continue;
541 }
542 // case insensitive; must be ASCII
543 auto const name(::rtl::OStringToOUString(OString(line.substr(0, 
nColon)).toAsciiLowerCase(),
544  
RTL_TEXTENCODING_ASCII_US));
>>> CID 1615230:  Integer handling issues  (INTEGER_OVERFLOW)
>>> Expression "nColon + 1UL", which is equal to 0, where "nColon" is known 
>>> to be equal to 18446744073709551615, overflows the type that receives it, 
>>> an unsigned integer 64 bits wide.
545 sal_Int32 nStart(nColon + 1);
546 while (nStart < static_cast(line.size())
547&& (line[nStart] == ' ' || line[nStart] == '\t'))
548 {
549 ++nStart;
550 }

** CID 1615229:  Memory - illegal accesses  (UNINIT)



*** CID 1615229:  Memory - illegal accesses  (UNINIT)
/ucb/source/ucp/webdav-curl/SerfLockStore.cxx: 142 in 
http_dav_ucp::SerfLockStore::joinThreads()()
136 std::unique_lock aGuard(m_aMutex);
137 // FIXME: cure could be worse than the problem; we don't
138 // want to block on a long-standing webdav lock refresh request.
139 // perhaps we should timeout on a condition instead if a request
140 // is in progress.
141 if (m_pTickerThread.is())
>>> CID 1615229:  Memory - illegal accesses  (UNINIT)
>>> Using uninitialized value "aGuard._M_owns" when calling "stopTicker".
142 stopTicker(aGuard);
143 return true;
144 }
145 
146 void SerfLockStore::startThreads()
147 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DwRwS_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtrmiH2yJI-2BgyOtDjBdb4jwKZ9QWoZ487I1UR2VZnDzxykUz7oMxIB2eMuCumtTrOCwjuY9xRfX-2B616dpmH8DhezxCiuXdWTDls76mKHJJKR8eFWelCpjhO8E3Qm56p-2FXcnkX2Nb5OoiUO4gaqqUi60vIhTl4SyjN9SkcoQl0a7hI-3D



New Defects reported by Coverity Scan for LibreOffice

2024-07-25 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
126 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 4 of 4 defect(s)


** CID 1615139:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1615139:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/txtnode/fntcache.cxx: 2297 in 
SwDrawTextInfo::ApplyAutoColor(vcl::Font *)()
2291 else
2292 // we take the font color from the appearance page
2293 nNewColor = pViewOption->GetFontColor();
2294 }
2295 
2296 // change painting color depending of dark/bright 
background
>>> CID 1615139:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pVSh" to "GetWin", which dereferences it.
2297 if (!pVSh->GetWin() || // ie. IsPrinting, see 
SwViewShell::GetWin()
2298 
svtools::ColorConfig().GetColorValue(svtools::FONTCOLOR, false).nColor == 
COL_AUTO) // GetFontColor() uses the smart flag
2299 {
2300 if ( pCol->IsDark() )
2301 nNewColor = COL_WHITE;
2302 else

** CID 1615138:  Performance inefficiencies  (AUTO_CAUSES_COPY)
/sw/source/uibase/utlui/content.cxx: 6933 in 
SwContentTree::BringEntryToAttention(const weld::TreeIter &)()



*** CID 1615138:  Performance inefficiencies  (AUTO_CAUSES_COPY)
/sw/source/uibase/utlui/content.cxx: 6933 in 
SwContentTree::BringEntryToAttention(const weld::TreeIter &)()
6927 {
6928 std::vector aTextAttrArr;
6929 ItemSurrogates aSurrogates;
6930 
m_pActiveShell->GetAttrPool().GetItemSurrogates(aSurrogates, 
RES_TXTATR_REFMARK);
6931 for (const SfxPoolItem* pItem : aSurrogates)
6932 {
>>> CID 1615138:  Performance inefficiencies  (AUTO_CAUSES_COPY)
>>> Using the "auto" keyword without an "&" causes the copy of an object of 
>>> type "SwFormatRefMark".
6933 const auto rRefMark = static_cast(*pItem);
6934 const SwTextRefMark* pTextRef = 
rRefMark.GetTextRefMark();
6935 if (pTextRef && 
&pTextRef->GetTextNode().GetNodes() ==
6936 &m_pActiveShell->GetNodes())
6937 aTextAttrArr.push_back(pTextRef);
6938 }

** CID 1615137:  API usage errors  (LOCK)



*** CID 1615137:  API usage errors  (LOCK)
/chart2/source/tools/HistogramDataSequence.cxx: 46 in 
chart::HistogramDataSequence::~HistogramDataSequence()()
40 {
41 registerProperty(u"Role"_ustr, PROP_PROPOSED_ROLE,
42  0, // PropertyAttributes
43  &m_sRole, cppu::UnoType::get());
44 }
45 
>>> CID 1615137:  API usage errors  (LOCK)
>>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state.
46 HistogramDataSequence::~HistogramDataSequence() {}
47 
48 IMPLEMENT_FORWARD_XINTERFACE2(HistogramDataSequence, 
HistogramDataSequence_Base,
49   comphelper::OPropertyContainer2)
50 
51 IMPLEMENT_FORWARD_XTYPEPROVIDER2(HistogramDataSequence, 
HistogramDataSequence_Base,

** CID 1615136:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/guisaveas.cxx: 361 in 
ModelData_Impl::ModelData_Impl(SfxStoringHelper &, 
com::sun::star::uno::Reference, const 
com::sun::star::uno::Sequence &)()



*** CID 1615136:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/guisaveas.cxx: 361 in 
ModelData_Impl::ModelData_Impl(SfxStoringHelper &, 
com::sun::star::uno::Reference, const 
com::sun::star::uno::Sequence &)()
355 : m_pOwner( &aOwner )
356 , m_xModel(std::move( xModel ))
357 , m_aMediaDescrHM( aMediaDescr )
358 , m_bRecommendReadOnly( false )
359 {
360 CheckInteractionHandler();
>>> CID 1615136:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_bSignWithDefaultSignature" is not 
>>> initialized in this constructor nor in any functions that it calls.
361 }
362 
363 
364 ModelData_Impl::~ModelData_Impl()
365 {
366 FreeDocumentProps();


__

New Defects reported by Coverity Scan for LibreOffice

2024-07-20 Thread scan-admin
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.
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 2 of 2 defect(s)


** CID 1610739:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx: 1549 in 
writerfilter::dmapper::DomainMapper_Impl::GetInheritedParaProperty(writerfilter::dmapper::PropertyIds)()



*** CID 1610739:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx: 1549 in 
writerfilter::dmapper::DomainMapper_Impl::GetInheritedParaProperty(writerfilter::dmapper::PropertyIds)()
1543 pEntry = pEntry = GetStyleSheetTable()->FindStyleSheetByISTD(
1544 
GetStyleSheetTable()->GetCurrentEntry()->m_sBaseStyleIdentifier);
1545 else
1546 pEntry = 
GetStyleSheetTable()->FindStyleSheetByConvertedStyleName(GetCurrentParaStyleName());
1547 
1548 const bool bCheckDocDefaults = !IsDocDefaultsImport();
>>> CID 1610739:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "pEntry" is passed-by-value as parameter to "GetPropertyFromStyleSheet" 
>>> when it could be moved instead.
1549 return GetPropertyFromStyleSheet(eId, pEntry, bCheckDocDefaults, 
/*bPara=*/true);
1550 }
1551 
1552 uno::Any DomainMapper_Impl::GetPropertyFromCharStyleSheet(PropertyIds 
eId, const PropertyMapPtr& rContext)
1553 {
1554 if ( m_bInStyleSheetImport || eId == PROP_CHAR_STYLE_NAME || 
!isCharacterProperty(eId) )

** CID 1610738:  Control flow issues  (DEADCODE)
/vcl/source/control/imivctl1.cxx: 1032 in 
SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry *, const Point &, 
OutputDevice &)()



*** CID 1610738:  Control flow issues  (DEADCODE)
/vcl/source/control/imivctl1.cxx: 1032 in 
SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry *, const Point &, 
OutputDevice &)()
1026 else
1027 aNewFont.SetFillColor(rSettings.GetDeactiveColor());
1028 
1029 Color aTextColor(rSettings.GetTabTextColor());
1030 if (bSelected)
1031 aTextColor = rSettings.GetTabHighlightTextColor();
>>> CID 1610738:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "if (bMouseHovered)
  aTextC...".
1032 else if (bMouseHovered)
1033 aTextColor = rSettings.GetTabRolloverTextColor();
1034 aNewFont.SetColor(aTextColor);
1035 
1036 rRenderContext.SetFont(aNewFont);
1037 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D_Yu8_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtX2vmD9iJKtmpcEVqjWkQQaoN7qw0GPVnbpO-2F6h9Xq-2F-2FW14f83UPpfBO9R90QyIWH-2Fll2PHIwkkAcVGvNAPUHf7u3giVNusI0yph0zsmBWZ6AXTd6DeGsHvieLDxCLoHU3J6sndy8KuHFimSyde1vK2qfG9AN0WSHApWTVWh17MQ-3D



New Defects reported by Coverity Scan for LibreOffice

2024-07-18 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
102 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 1 of 1 defect(s)


** CID 1610708:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx: 107 in 
drawinglayer::primitive2d::PolyPolygonRGBAGradientPrimitive2D::PolyPolygonRGBAGradientPrimitive2D(basegfx::B2DPolyPolygon,
 const basegfx::B2DRange &, drawinglayer::attribute::FillGradientAttribute, 
drawinglayer::attribute::FillGradientAttribute)()



*** CID 1610708:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx: 107 in 
drawinglayer::primitive2d::PolyPolygonRGBAGradientPrimitive2D::PolyPolygonRGBAGradientPrimitive2D(basegfx::B2DPolyPolygon,
 const basegfx::B2DRange &, drawinglayer::attribute::FillGradientAttribute, 
drawinglayer::attribute::FillGradientAttribute)()
101 }
102 
103 PolyPolygonRGBAGradientPrimitive2D::PolyPolygonRGBAGradientPrimitive2D(
104 basegfx::B2DPolyPolygon aPolyPolygon, const basegfx::B2DRange& 
rDefinitionRange,
105 attribute::FillGradientAttribute aFillGradient,
106 attribute::FillGradientAttribute aFillGradientAlpha)
>>> CID 1610708:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aPolyPolygon" is passed-by-value as parameter to 
>>> "drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D::PolyPolygonGradientPrimitive2D(basegfx::B2DPolyPolygon,
>>>  basegfx::B2DRange const &, 
>>> drawinglayer::attribute::FillGradientAttribute)" when it could be moved 
>>> instead.
107 : PolyPolygonGradientPrimitive2D(aPolyPolygon, rDefinitionRange, 
aFillGradient)
108 , maFillGradientAlpha(aFillGradientAlpha)
109 {
110 // assert when the definition is not allowed, it HAS to fulfil the
111 // requested preconditions
112 assert(aFillGradient.sameDefinitionThanAlpha(aFillGradientAlpha));



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DRTrD_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGt0-2B8s7rMq9rZJ9jFKzTqzedQ3CCPg2s1wvsAOV87RfZjxBWRfkZ-2BgUmwZOJR8zBaCV5sIlVPrhmTHhljm39nGWDAqC-2FjLBX0YMhMemmNiRw-2Bde7eSnG0XlMAz55JpeQeTjIIngpb9w3URhQQNgbWLAFuVf2SeiZbJs8DDvLHBp5M-3D



New Defects reported by Coverity Scan for LibreOffice

2024-07-13 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
52 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 4 of 4 defect(s)


** CID 1610243:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/wrtsh/select.cxx: 754 in 
SwWrtShell::SetInsMode(bool)::[lambda(int) (instance 1)]::lambda(const 
[lambda(int) (instance 1)]&)()



*** CID 1610243:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/wrtsh/select.cxx: 754 in 
SwWrtShell::SetInsMode(bool)::[lambda(int) (instance 1)]::lambda(const 
[lambda(int) (instance 1)]&)()
748 void SwWrtShell::SetInsMode( bool bOn )
749 {
750 const bool bDoAsk = 
officecfg::Office::Common::Misc::QuerySetInsMode::get();
751 if (!bOn && bDoAsk)
752 {
753 auto xDialog = 
std::make_shared(GetView().GetFrameWeld());
>>> CID 1610243:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
754 weld::DialogController::runAsync(xDialog, [this, bOn, 
xDialog](sal_Int32 nResult){
755 
756 std::shared_ptr xChanges(
757 comphelper::ConfigurationChanges::create());
758 
officecfg::Office::Common::Misc::QuerySetInsMode::set(!xDialog->GetDoNotShowAgain(),
 xChanges);
759 xChanges->commit();

** CID 1610242:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/wrtsh/select.cxx: 754 in 
SwWrtShell::SetInsMode(bool)::[lambda(int) (instance 1)]::lambda([lambda(int) 
(instance 1)]&&)()



*** CID 1610242:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/wrtsh/select.cxx: 754 in 
SwWrtShell::SetInsMode(bool)::[lambda(int) (instance 1)]::lambda([lambda(int) 
(instance 1)]&&)()
748 void SwWrtShell::SetInsMode( bool bOn )
749 {
750 const bool bDoAsk = 
officecfg::Office::Common::Misc::QuerySetInsMode::get();
751 if (!bOn && bDoAsk)
752 {
753 auto xDialog = 
std::make_shared(GetView().GetFrameWeld());
>>> CID 1610242:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
754 weld::DialogController::runAsync(xDialog, [this, bOn, 
xDialog](sal_Int32 nResult){
755 
756 std::shared_ptr xChanges(
757 comphelper::ConfigurationChanges::create());
758 
officecfg::Office::Common::Misc::QuerySetInsMode::set(!xDialog->GetDoNotShowAgain(),
 xChanges);
759 xChanges->commit();

** CID 1610241:  Integer handling issues  (NEGATIVE_RETURNS)



*** CID 1610241:  Integer handling issues  (NEGATIVE_RETURNS)
/vcl/source/control/ivctrl.cxx: 539 in 
VerticalTabControl::RemovePage(std::basic_string_view>)()
533 for (auto it = maPageList.begin(), end = maPageList.end(); it != 
end; ++it)
534 {
535 VerticalTabPageData* pData = it->get();
536 if (pData->sId == rPageId)
537 {
538 sal_Int32 nEntryListPos = 
m_xChooser->GetEntryListPos(pData->pEntry);
>>> CID 1610241:  Integer handling issues  (NEGATIVE_RETURNS)
>>> "nEntryListPos" is passed to a parameter that cannot be negative.
539 m_xChooser->RemoveEntry(nEntryListPos);
540 m_xChooser->ArrangeIcons();
541 maPageList.erase(it);
542 break;
543 }
544 }

** CID 1610240:  Null pointer dereferences  (FORWARD_NULL)
/desktop/source/lib/init.cxx: 3195 in 
lo_extractDocumentStructureRequest(_LibreOfficeKit *, const char *)()



*** CID 1610240:  Null pointer dereferences  (FORWARD_NULL)
/desktop/source/lib/init.cxx: 3195 in 
lo_extractDocumentStructureRequest(_LibreOfficeKit *, const char *)()
3189 //if it is a writer document..
3190 uno::Reference xDocument(xComp, 
uno::UNO_QUERY_THROW);
3191 if 
(xDocument->supportsService(u"com.sun.star.text.TextDocument"_ustr) || 
xDocument->supportsService(u"com.sun.star.text.WebDocument"_ustr))
3192 {
3193 tools::JsonWriter aJson;
3194 {
>>> CID 1610240:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pDoc" to "getCommandValue

New Defects reported by Coverity Scan for LibreOffice

2024-07-08 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
192 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 1 of 1 defect(s)


** CID 1609760:  Uninitialized members  (UNINIT_CTOR)
/sd/source/filter/eppt/epptooxml.hxx: 172 in 
oox::core::PowerPointExport::AuthorComments::AuthorComments()()



*** CID 1609760:  Uninitialized members  (UNINIT_CTOR)
/sd/source/filter/eppt/epptooxml.hxx: 172 in 
oox::core::PowerPointExport::AuthorComments::AuthorComments()()
166 sal_Int32 nId;
167 sal_Int32 nLastIndex;
168 OUString sInitials;
169 
170 AuthorComments()
171 {
>>> CID 1609760:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "nLastIndex" is not initialized in this 
>>> constructor nor in any functions that it calls.
172 }
173 AuthorComments(sal_Int32 nId_, sal_Int32 nLastIndex_, OUString 
sInitials_)
174 : nId(nId_)
175 , nLastIndex(nLastIndex_)
176 , sInitials(sInitials_)
177 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DTF76_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGthTS6Wf-2B29fpssdCkwIBXttWFZtloBG8X2fXobfAyl5ETvFJCeYQDs7-2F2twySeAmU-2Bkaypbv3yN2KVG3G85pDI-2Be6LASSCMl4jlL3dJ1Nqx2dklNX8SnNl5kycAEF1FH1PenVEdFgIcgiY3wlKWTViAYmJPWLGtL-2BPQCIzLUsuLM-3D



New Defects reported by Coverity Scan for LibreOffice

2024-07-07 Thread scan-admin
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.
318 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 1609652:(COPY_INSTEAD_OF_MOVE)
/oox/source/drawingml/shape.cxx: 1654 in 
oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase &, const 
rtl::OUString &, const oox::drawingml::Theme *, const 
com::sun::star::uno::Reference &, bool, bool, 
basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const 
std::shared_ptr &)()
/oox/source/drawingml/shape.cxx: 1658 in 
oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase &, const 
rtl::OUString &, const oox::drawingml::Theme *, const 
com::sun::star::uno::Reference &, bool, bool, 
basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const 
std::shared_ptr &)()



*** CID 1609652:(COPY_INSTEAD_OF_MOVE)
/oox/source/drawingml/shape.cxx: 1654 in 
oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase &, const 
rtl::OUString &, const oox::drawingml::Theme *, const 
com::sun::star::uno::Reference &, bool, bool, 
basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const 
std::shared_ptr &)()
1648 beans::PropertyValue 
aPair(comphelper::makePropertyValue(u"mso-rotation-angle"_ustr,
1649
  mnRotation));
1650 if (aGrabBag.hasElements())
1651 {
1652 sal_Int32 nLength = aGrabBag.getLength();
1653 aGrabBag.realloc(nLength + 1);
>>> CID 1609652:(COPY_INSTEAD_OF_MOVE)
>>> "aPair" is copied in a call to copy assignment "operator =", when it 
>>> could be moved instead.
1654 aGrabBag.getArray()[nLength] = aPair;
1655 }
1656 else
1657 {
1658 aGrabBag = { aPair };
1659 }
/oox/source/drawingml/shape.cxx: 1658 in 
oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase &, const 
rtl::OUString &, const oox::drawingml::Theme *, const 
com::sun::star::uno::Reference &, bool, bool, 
basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const 
std::shared_ptr &)()
1652 sal_Int32 nLength = aGrabBag.getLength();
1653 aGrabBag.realloc(nLength + 1);
1654 aGrabBag.getArray()[nLength] = aPair;
1655 }
1656 else
1657 {
>>> CID 1609652:(COPY_INSTEAD_OF_MOVE)
>>> "aPair" is copied in call to copy constructor 
>>> "com::sun::star::beans::PropertyValue", when it could be moved instead.
1658 aGrabBag = { aPair };
1659 }
1660 xPropertySet->setPropertyValue(aGrabBagPropName, 
uno::Any(aGrabBag));
1661 }
1662 // TextFrames have ShadowFormat, not individual shadow 
properties.
1663 std::optional oShadowDistance;

** CID 1609651:  Memory - illegal accesses  (RETURN_LOCAL)
/vcl/source/filter/graphicfilter.cxx: 894 in 
GraphicFilter::ImportUnloadedGraphic(SvStream &, unsigned long, const Size *)()



*** CID 1609651:  Memory - illegal accesses  (RETURN_LOCAL)
/vcl/source/filter/graphicfilter.cxx: 894 in 
GraphicFilter::ImportUnloadedGraphic(SvStream &, unsigned long, const Size *)()
888 {
889 pSizeHint = &aLogicSize;
890 }
891 }
892 
893 
aGraphic.SetGfxLink(std::make_shared(aBinaryDataContainer, eLinkType));
>>> CID 1609651:  Memory - illegal accesses  (RETURN_LOCAL)
>>> Using "pSizeHint", which points to an out-of-scope variable 
>>> "aLogicSize".
894 aGraphic.ImplGetImpGraphic()->setPrepared(bAnimated, 
pSizeHint);
895 }
896 }
897 
898 // Set error code or try to set native buffer
899 if (nStatus != ERRCODE_NONE)

** CID 1609650:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/oox/source/drawingml/shape.cxx: 1219 in 
oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase &, const 
rtl::OUString &, const oox::drawingml::Theme *, const 
com::sun::star::uno::Reference &, bool, bool, 
basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const 
std::shared_ptr &)()


__

New Defects reported by Coverity Scan for LibreOffice

2024-07-04 Thread scan-admin
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.
29 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 1609598:(COPY_INSTEAD_OF_MOVE)
/sd/source/ui/view/OutlinerIterator.cxx: 174 in 
sd::outliner::OutlinerContainer::CreateIterator(sd::outliner::IteratorLocation)()
/sd/source/ui/view/OutlinerIterator.cxx: 166 in 
sd::outliner::OutlinerContainer::CreateIterator(sd::outliner::IteratorLocation)()



*** CID 1609598:(COPY_INSTEAD_OF_MOVE)
/sd/source/ui/view/OutlinerIterator.cxx: 174 in 
sd::outliner::OutlinerContainer::CreateIterator(sd::outliner::IteratorLocation)()
168 mpOutliner->mbDirectionIsForward,
169 aLocation);
170 else
171 // Search in the whole document.
172 return CreateDocumentIterator (
173 mpOutliner->mpDrawDocument,
>>> CID 1609598:(COPY_INSTEAD_OF_MOVE)
>>> "pOverridingShell" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
174 pOverridingShell ? pOverridingShell :
175 mpOutliner->mpWeakViewShell.lock(),
176 mpOutliner->mbDirectionIsForward,
177 aLocation);
178 }
179 
/sd/source/ui/view/OutlinerIterator.cxx: 166 in 
sd::outliner::OutlinerContainer::CreateIterator(sd::outliner::IteratorLocation)()
160 // use.
161 if (mpOutliner->mbRestrictSearchToSelection)
162 // There is a selection.  Search only in this.
163 return CreateSelectionIterator (
164 mpOutliner->maMarkListCopy,
165 mpOutliner->mpDrawDocument,
>>> CID 1609598:(COPY_INSTEAD_OF_MOVE)
>>> "pOverridingShell" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
166 pOverridingShell ? pOverridingShell :
167 mpOutliner->mpWeakViewShell.lock(),
168 mpOutliner->mbDirectionIsForward,
169 aLocation);
170 else
171 // Search in the whole document.

** CID 1609597:  API usage errors  (INVALIDATE_ITERATOR)
/svl/source/items/globalpool.cxx: 353 in implCreateItemEntry(SfxItemPool &, 
const SfxPoolItem *, bool)()



*** CID 1609597:  API usage errors  (INVALIDATE_ITERATOR)
/svl/source/items/globalpool.cxx: 353 in implCreateItemEntry(SfxItemPool &, 
const SfxPoolItem *, bool)()
347 if (pSource->isHashable())
348 gInstanceManagerMap.insert(
349 { aManagerKey, 
std::make_unique() });
350 else
351 gInstanceManagerMap.insert(
352 { aManagerKey, 
std::make_unique() });
>>> CID 1609597:  API usage errors  (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "gInstanceManagerMap.find(aManagerKey)" though 
>>> it is already past the end of its container.
353 pManager = 
gInstanceManagerMap.find(aManagerKey)->second.get();
354 }
355 
356 bool bSuccess = pManager->add(*pSource);
357 assert(bSuccess && "failed to add item to pool");
358 (void)bSuccess;

** CID 1609596:  Integer handling issues  (SIGN_EXTENSION)
/svl/source/items/globalpool.cxx: 180 in ::PairHash::operator ()(const 
std::pair &) const()



*** CID 1609596:  Integer handling issues  (SIGN_EXTENSION)
/svl/source/items/globalpool.cxx: 180 in ::PairHash::operator ()(const 
std::pair &) const()
174 };
175 
176 struct PairHash
177 {
178 size_t operator()(const std::pair& rKey) 
const
179 {
>>> CID 1609596:  Integer handling issues  (SIGN_EXTENSION)
>>> Suspicious implicit sign extension: "rKey.first" with type 
>>> "SfxItemType" (16 bits, unsigned) is promoted in 
>>> "(static_cast(rKey.first) << 16) | rKey.second" to type "int" (32 
>>> bits, signed), then sign-extended to type "unsigned long" (64 bits, 
>>> unsigned).  If "(static_cast(rKey.first) << 16) | rKey.second" is 
>>> greater than 0x7FFF, the upper bits of the result will all be 1.
180 return (static_cast(rKey.first) << 16) | rKey.second;
181 }
182 };
183 }
184 // The single static instance that takes over that global Item sharing
185 // Maps SfxItemPool sub-classes to a set of shared items.

** CID 1609595:  Null pointer dereferences  (NULL_RETURNS)
/sd/source/ui/view/Outliner.cxx: 1851 in SdO

New Defects reported by Coverity Scan for LibreOffice

2024-07-02 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 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 1 of 1 defect(s)


** CID 1608717:  Control flow issues  (DEADCODE)
/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx: 733 in 
::getOrCreateCairoSurfaceHelper(const BitmapEx &)()



*** CID 1608717:  Control flow issues  (DEADCODE)
/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx: 733 in 
::getOrCreateCairoSurfaceHelper(const BitmapEx &)()
727 }
728 }
729 
730 if (pSystemDependentData_CairoSurface)
731 return 
pSystemDependentData_CairoSurface->getCairoSurfaceHelper();
732 
>>> CID 1608717:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: ".shared_ptr(std:...".
733 return nullptr;
734 }
735 
736 // This bit-tweaking looping is unpleasant and unfortunate
737 void LuminanceToAlpha(cairo_surface_t* pMask)
738 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D25tN_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtetKN6IKOTwIePggAXMtoNvGcICS7AUoTDBF6s7eaZefU8HkgioVTLjKh0hgesu0NLJUB7zjIEo-2FRIW6HLZ8-2BFIU1iummDENtj04tIIpenx-2BTeSP0Bl2012BcwQBACBbKY7KtYWikQF6oSA4chhkrTeHC8xwv-2FmmhCGSUxjAhKKk-3D



Re: New Defects reported by Coverity Scan for LibreOffice

2024-07-02 Thread Caolán McNamara
On Mon, 2024-07-01 at 20:55 +, scan-ad...@coverity.com wrote:
> Hi,
> 
> Please find the latest report on new defect(s) introduced to
> LibreOffice found with Coverity Scan.
> 
> 300 new defect(s) introduced to LibreOffice found with Coverity Scan.

The version of coverity that we were using, 2023.6.2, is now EOL so
these results (3486, not 300) are from the current version of 2023.12.2
which is exceptionally noisy. 

It might be that tweaking what version of host compiler is used might
help so I'll try a few things. One big block of dubious warnings is
around claims that std::unique_lock::_M_owns is uninitialized, on the
other hand some of the new "auto" related warnings look potentially
useful.


New Defects reported by Coverity Scan for LibreOffice

2024-07-01 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

300 new defect(s) introduced to LibreOffice found with Coverity Scan.
175 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 20 of 300 defect(s)


** CID 1608034:(LOCK)
/filter/source/config/cache/typedetection.cxx: 1046 in 
filter::config::TypeDetection::impl_detectTypeFlatAndDeep(utl::MediaDescriptor 
&, const std::vector> &, bool, rtl::OUString &)()
/filter/source/config/cache/typedetection.cxx: 1045 in 
filter::config::TypeDetection::impl_detectTypeFlatAndDeep(utl::MediaDescriptor 
&, const std::vector> &, bool, rtl::OUString &)()



*** CID 1608034:(LOCK)
/filter/source/config/cache/typedetection.cxx: 1046 in 
filter::config::TypeDetection::impl_detectTypeFlatAndDeep(utl::MediaDescriptor 
&, const std::vector> &, bool, rtl::OUString &)()
1040 
1041 OUString sDeepType = impl_askDetectService(sDetectService, 
rDescriptor);
1042 
1043 // d)
1044 if (!sDeepType.isEmpty())
1045 return sDeepType;
>>> CID 1608034:(LOCK)
>>> "~unique_lock" unlocks "aLock" while it is unlocked. [Note: The source 
>>> code implementation of the function has been overridden by a builtin model.]
1046 }
1047 catch(const css::container::NoSuchElementException&)
1048 {}
1049 // e)
1050 }
1051 
/filter/source/config/cache/typedetection.cxx: 1045 in 
filter::config::TypeDetection::impl_detectTypeFlatAndDeep(utl::MediaDescriptor 
&, const std::vector> &, bool, rtl::OUString &)()
1039 }
1040 
1041 OUString sDeepType = impl_askDetectService(sDetectService, 
rDescriptor);
1042 
1043 // d)
1044 if (!sDeepType.isEmpty())
>>> CID 1608034:(LOCK)
>>> "~unique_lock" unlocks "aLock" while it is unlocked. [Note: The source 
>>> code implementation of the function has been overridden by a builtin model.]
1045 return sDeepType;
1046 }
1047 catch(const css::container::NoSuchElementException&)
1048 {}
1049 // e)
1050 }

** CID 1608033:  Memory - illegal accesses  (INTEGER_OVERFLOW)
/sc/source/core/data/table3.cxx: 2056 in ScTable::DoSubTotals(ScSubTotalParam 
&)()



*** CID 1608033:  Memory - illegal accesses  (INTEGER_OVERFLOW)
/sc/source/core/data/table3.cxx: 2056 in ScTable::DoSubTotals(ScSubTotalParam 
&)()
2050 
2051 for (sal_uInt16 nLevel=0; nLevel>> CID 1608033:  Memory - illegal accesses  (INTEGER_OVERFLOW)
>>> "aRowEntry.nGroupNo", which might have underflowed, is passed to 
>>> "rParam.nSubTotals[aRowEntry.nGroupNo]".
2056 SCCOL nResCount = 
rParam.nSubTotals[aRowEntry.nGroupNo];
2057 // result functions
2058 ScSubTotalFunc* pResFunc = 
rParam.pFunctions[aRowEntry.nGroupNo].get();
2059 
2060 if (nResCount > 0)  // 
otherwise only sort
2061 {

** CID 1608032:(INTEGER_OVERFLOW)
/sw/source/core/doc/gctable.cxx: 446 in lcl_MergeGCLine(SwTableLine *, 
::GCLinePara *)()
/sw/source/core/doc/gctable.cxx: 444 in lcl_MergeGCLine(SwTableLine *, 
::GCLinePara *)()



*** CID 1608032:(INTEGER_OVERFLOW)
/sw/source/core/doc/gctable.cxx: 446 in lcl_MergeGCLine(SwTableLine *, 
::GCLinePara *)()
440 nBoxes = pLn->GetTabBoxes().size();
441 }
442 
443 // ATTENTION: The number of boxes can change!
444 for( SwTableBoxes::size_type nLen = 0; nLen < 
pLn->GetTabBoxes().size(); ++nLen )
445 if( !lcl_MergeGCBox( pLn->GetTabBoxes()[nLen], pGCPara ))
>>> CID 1608032:(INTEGER_OVERFLOW)
>>> Expression "--nLen", which is equal to 18446744073709551615, where 
>>> "nLen" is known to be equal to 0, underflows the type that receives it, an 
>>> unsigned integer 64 bits wide.
446 --nLen;
447 }
448 return true;
449 }
450 
451 // Clean structure a bit
/sw/source/core/doc/gctable.cxx: 444 in lcl_MergeGCLine(SwTableLine *, 
::GCLinePara *)()
438 
439 pLn = pLine;// and set up anew
440 nBoxes = pLn->GetTabBoxes().size();
441 }
442 
443 // ATTENTION: The number of boxes can change!
>>> CID 1608032:(INTEGER_OVERFLOW)
>>> Expression "++nLen", which is equal to 0, where "nLen" is known 

New Defects reported by Coverity Scan for LibreOffice

2024-06-20 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)


** CID 1604132:  Incorrect expression  (IDENTICAL_BRANCHES)
/vcl/source/gdi/pdfwriter_impl.cxx: 5678 in 
vcl::PDFWriterImpl::finalizeSignature()()



*** CID 1604132:  Incorrect expression  (IDENTICAL_BRANCHES)
/vcl/source/gdi/pdfwriter_impl.cxx: 5678 in 
vcl::PDFWriterImpl::finalizeSignature()()
5672 if (osl::File::E_None != m_aFile.setPos(osl_Pos_Absolut, 
m_nSignatureLastByteRangeNoOffset))
5673 return false;
5674 OString aByteRangeNo = OString::number( nLastByteRangeNo ) + " ]";
5675 
5676 if (m_aFile.write(aByteRangeNo.getStr(), aByteRangeNo.getLength(), 
nWritten) != osl::File::E_None)
5677 {
>>> CID 1604132:  Incorrect expression  (IDENTICAL_BRANCHES)
>>> The same code is executed when the condition "osl::FileBase::E_None != 
>>> this->m_aFile.setPos(1U, nOffset)" is true or false, because the code in 
>>> the if-then branch and after the if statement is identical. Should the if 
>>> statement be removed?
5678 if (osl::File::E_None != m_aFile.setPos(osl_Pos_Absolut, 
nOffset))
5679 return false;
5680 return false;
5681 }
5682 
5683 // 3- create the PKCS#7 object using NSS

** CID 1604131:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1604131:  Null pointer dereferences  (NULL_RETURNS)
/editeng/source/editeng/impedit3.cxx: 643 in 
ImpEditEngine::CheckPageOverflow()()
637 
638 sal_uInt32 nParaCount = maParaPortionList.Count();
639 bool bOnlyOneEmptyPara = false;
640 if (nParaCount == 1)
641 {
642 const ParaPortion* pPPortion = 
GetParaPortions().SafeGetObject(0);
>>> CID 1604131:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pPPortion->GetLines()" 
>>> when calling "Count".
643 bOnlyOneEmptyPara = pPPortion->GetLines().Count() == 1
644 && pPPortion->GetLines()[0].GetLen() == 0;
645 }
646 
647 if (nTxtHeight > nBoxHeight && !bOnlyOneEmptyPara)
648 {

** CID 1604130:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1604130:  Null pointer dereferences  (NULL_RETURNS)
/editeng/source/editeng/impedit2.cxx: 3697 in 
ImpEditEngine::GetLineNumberAtIndex(int, int)()
3691 {
3692 // we explicitly allow for the index to point at the character 
right behind the text
3693 const bool bValidIndex = /*0 <= nIndex &&*/ nIndex <= 
pNode->Len();
3694 OSL_ENSURE( bValidIndex, "GetLineNumberAtIndex: invalid index" 
);
3695 const ParaPortion* pPPortion = 
maParaPortionList.SafeGetObject(nPara);
3696 const EditLineList& rLineList = pPPortion->GetLines();
>>> CID 1604130:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "rLineList" when 
>>> calling "Count".
3697 const sal_Int32 nLineCount = rLineList.Count();
3698 if (nIndex == pNode->Len())
3699 nLineNo = nLineCount > 0 ? nLineCount - 1 : 0;
3700 else if (bValidIndex)   // nIndex < pNode->Len()
3701 {
3702 sal_Int32 nStart = -1, nEnd = -1;

** CID 1604129:  Uninitialized members  (UNINIT_CTOR)
/codemaker/source/netmaker/netproduce.hxx: 27 in NetProducer::NetProducer()()



*** CID 1604129:  Uninitialized members  (UNINIT_CTOR)
/codemaker/source/netmaker/netproduce.hxx: 27 in NetProducer::NetProducer()()
21 class NetProducer
22 {
23 public:
24 NetProducer()
25 : m_manager(new TypeManager())
26 {
>>> CID 1604129:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_dryRun" is not initialized in this 
>>> constructor nor in any functions that it calls.
27 }
28 
29 public:
30 void initProducer(const NetOptions& options);
31 void produceAll();
32 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DPf01_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtIRGEEv60T

New Defects reported by Coverity Scan for LibreOffice

2024-06-15 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
6 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 4 of 4 defect(s)


** CID 1603806:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/core/unocore/unofield.cxx: 2954 in 
SwXTextFieldTypes::getByUniqueID(const rtl::OUString &)()



*** CID 1603806:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/core/unocore/unofield.cxx: 2954 in 
SwXTextFieldTypes::getByUniqueID(const rtl::OUString &)()
2948 
2949 const SwFieldTypes* pFieldTypes = 
rDoc.getIDocumentFieldsAccess().GetFieldTypes();
2950 auto fieldTypeIt = std::find_if(pFieldTypes->begin(), 
pFieldTypes->end(),
2951[](const std::unique_ptr& 
pType) {
2952return pType->Which() == 
SwFieldIds::Postit;
2953 });
>>> CID 1603806:  API usage errors  (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "fieldTypeIt" though it is already past the end 
>>> of its container.
2954 const SwFieldType & rCurType = **fieldTypeIt;
2955 std::vector vFormatFields;
2956 rCurType.GatherFields(vFormatFields);
2957 for (const SwFormatField* pFormatField : vFormatFields)
2958 {
2959 const SwPostItField* pField = static_cast(pFormatField->GetField());

** CID 1603805:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/inc/document.hxx: 1987 in 
ScDocument::SetGoalSeekSettings(ScGoalSeekSettings)()



*** CID 1603805:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/inc/document.hxx: 1987 in 
ScDocument::SetGoalSeekSettings(ScGoalSeekSettings)()
1981 
1982 // Goal Seek solver
1983 bool   Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
1984SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
1985const OUString& sValStr, double& nX, 
bool setNA = true);
1986 ScGoalSeekSettings GetGoalSeekSettings() { return 
maGoalSeekSettings; }
>>> CID 1603805:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aNewSettings" is copied in a call to copy assignment "operator =", 
>>> when it could be moved instead.
1987 void   SetGoalSeekSettings(ScGoalSeekSettings 
aNewSettings) { maGoalSeekSettings = aNewSettings; }
1988 
1989 SC_DLLPUBLIC void   ApplySelectionPattern( const 
ScPatternAttr& rAttr, const ScMarkData& rMark,
1990
ScEditDataArray* pDataArray = nullptr, bool* pIsChanged = nullptr );
1991 SC_DLLPUBLIC void   DeleteSelection( InsertDeleteFlags 
nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
1992 voidDeleteSelectionTab( SCTAB nTab, 
InsertDeleteFlags nDelFlag, const ScMarkData& rMark );

** CID 1603804:  Error handling issues  (CHECKED_RETURN)
/linguistic/source/dicimp.cxx: 133 in ReadDicVersion(SvStream &, 
o3tl::strong_int &, bool &, rtl::OUString &)()



*** CID 1603804:  Error handling issues  (CHECKED_RETURN)
/linguistic/source/dicimp.cxx: 133 in ReadDicVersion(SvStream &, 
o3tl::strong_int &, bool &, rtl::OUString &)()
127 bool bSuccess;
128 OStringBuffer aLine;
129 
130 nDicVersion = DIC_VERSION_7;
131 
132 // 1st skip magic / header line
>>> CID 1603804:  Error handling issues  (CHECKED_RETURN)
>>> Calling "ReadLine" without checking return value (as is done elsewhere 
>>> 13 out of 16 times).
133 rStream.ReadLine(aLine);
134 
135 // 2nd line: language all | en-US | pt-BR ...
136 while ((bSuccess = rStream.ReadLine(aLine)))
137 {
138 OString aTagValue;

** CID 1603803:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/docshell/impex.cxx: 2069 in ScImportExport::Sylk2Doc(SvStream &)()



*** CID 1603803:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/docshell/impex.cxx: 2069 in ScImportExport::Sylk2Doc(SvStream &)()
2063 SCCOL nRefCol = nCol;
2064 SCROW nRefRow = nRow;
2065 rStrm.Seek( nOldPos );
2066 for( ;; )
2067 {
2068 //! allow unicode
>>> CID 1603803:  Error handling issues  (CHECKED_RETURN)
>>> Calling "

New Defects reported by Coverity Scan for LibreOffice

2024-06-12 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

26 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 20 of 26 defect(s)


** CID 1603634:  Performance inefficiencies  (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 450 in 
EditUndoSetStyleSheet::EditUndoSetStyleSheet(EditEngine *, int, rtl::OUString, 
SfxStyleFamily, rtl::OUString, SfxStyleFamily, SfxItemSet)()



*** CID 1603634:  Performance inefficiencies  (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 450 in 
EditUndoSetStyleSheet::EditUndoSetStyleSheet(EditEngine *, int, rtl::OUString, 
SfxStyleFamily, rtl::OUString, SfxStyleFamily, SfxItemSet)()
444 EditSelection aNewSel = 
GetEditEngine()->MoveParagraphs(nParagraphs, nDest);
445 GetEditEngine()->GetActiveView()->getImpl().SetEditSelection( 
aNewSel );
446 }
447 
448 EditUndoSetStyleSheet::EditUndoSetStyleSheet(
449 EditEngine* pEE, sal_Int32 nP, OUString _aPrevName, SfxStyleFamily 
ePrevFam,
>>> CID 1603634:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter _aPrevParaAttribs of type "SfxItemSet" (size 144 
>>> bytes) by value, which exceeds the low threshold of 128 bytes.
450 OUString _aNewName, SfxStyleFamily eNewFam, SfxItemSet 
_aPrevParaAttribs) :
451 EditUndo(EDITUNDO_STYLESHEET, pEE),
452 nPara(nP),
453 aPrevName(std::move(_aPrevName)),
454 aNewName(std::move(_aNewName)),
455 ePrevFamily(ePrevFam),

** CID 1603633:  Performance inefficiencies  (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 503 in 
EditUndoSetAttribs::EditUndoSetAttribs(EditEngine *, const ESelection &, 
SfxItemSet)()



*** CID 1603633:  Performance inefficiencies  (PASS_BY_VALUE)
/editeng/source/editeng/editundo.cxx: 503 in 
EditUndoSetAttribs::EditUndoSetAttribs(EditEngine *, const ESelection &, 
SfxItemSet)()
497 {
498 DBG_ASSERT( GetEditEngine()->GetActiveView(), "Undo/Redo: No Active 
View!" );
499 GetEditEngine()->SetParaAttribsOnly( nPara, aNewItems );
500 lcl_DoSetSelection( GetEditEngine()->GetActiveView(), nPara );
501 }
502 
>>> CID 1603633:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter aNewItems of type "SfxItemSet" (size 144 bytes) by 
>>> value, which exceeds the low threshold of 128 bytes.
503 EditUndoSetAttribs::EditUndoSetAttribs(EditEngine* pEE, const 
ESelection& rESel, SfxItemSet aNewItems) :
504 EditUndo(EDITUNDO_ATTRIBS, pEE),
505 aESel(rESel),
506 aNewAttribs(std::move(aNewItems)),
507 nSpecial(SetAttribsMode::NONE),
508 m_bSetSelection(true),

** CID 1603632:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/docshell/docsh4.cxx: 1972 in ScDocShell::ExecutePageStyle(const 
SfxViewShell &, SfxRequest &, short)::[lambda(int) (instance 1)]::operator 
()(int) const()



*** CID 1603632:  Performance inefficiencies  (PASS_BY_VALUE)
/sc/source/ui/docshell/docsh4.cxx: 1972 in ScDocShell::ExecutePageStyle(const 
SfxViewShell &, SfxRequest &, short)::[lambda(int) (instance 1)]::operator 
()(int) const()
1966 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
1967 
1968 VclPtr 
pDlg(pFact->CreateScStyleDlg(GetActiveDialogParent(), *pStyleSheet, true));
1969 
1970 auto xRequest = 
std::make_shared(rReq);
1971 rReq.Ignore(); // the 'old' request is not 
relevant any more
>>> CID 1603632:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Capturing variable "aOldData" of type "ScStyleSaveData" (size 168 
>>> bytes) by value, which exceeds the low threshold of 128 bytes.
1972 pDlg->StartExecuteAsync([this, pDlg, 
xRequest=std::move(xRequest), pStyleSheet, aOldData,
1973  aOldName, &rStyleSet, 
nCurTab, &rCaller, bUndo](sal_Int32 nResult) {
1974 if ( nResult == RET_OK )
1975 {
1976 const SfxItemSet* pOutSet = 
pDlg->GetOutputItemSet();
1977 

** CID 1603631:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1603631:  Null pointer dereferences  (NULL_RETURNS)
/sd/source/ui/dlg/tpaction.cxx: 144 in SdTPAction::SetView(const sd::View *)()
138 {
139 mpDoc = pDocSh->GetDoc();
140 SfxViewFrame* 

New Defects reported by Coverity Scan for LibreOffice

2024-06-08 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1603563:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx: 688 in 
ScAccessibleSpreadsheet::Notify(SfxBroadcaster &, const SfxHint &)()



*** CID 1603563:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx: 688 in 
ScAccessibleSpreadsheet::Notify(SfxBroadcaster &, const SfxHint &)()
682 {
683 OUString 
valStr(pScDoc->GetString(aNewCell.Col(),aNewCell.Row(),aNewCell.Tab()));
684 if(m_strCurCellValue != valStr)
685 {
686 uno::Any aOldValue;
687 uno::Any aNewValue;
>>> CID 1603563:  Error handling issues  (CHECKED_RETURN)
>>> Calling "implInitTextChangedEvent" without checking return value (as is 
>>> done elsewhere 7 out of 8 times).
688 
comphelper::OCommonAccessibleText::implInitTextChangedEvent(m_strCurCellValue, 
valStr, aOldValue, aNewValue);
689 AccessibleEventObject aTextChangedEvent;
690 aTextChangedEvent.EventId = 
AccessibleEventId::TEXT_CHANGED;
691 aTextChangedEvent.OldValue = aOldValue;
692 aTextChangedEvent.NewValue = aNewValue;
693 mpAccCell->CommitChange(aTextChangedEvent);



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D2yhF_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtmVoA1ZVpVtHQewmxaxpP10IOsJWFFHZ1AWjnb-2BNn4Dm5uyy5rIiKxQhMDSKKdArZJmQsaQdkJf7dCm-2BsgvDhmKs6cjEsTI1PB833ifS08gUSajunuSq7tgJZ0ZJKQwCpl2ukeBgr4z38hc7rWcKXJH5wyNr4mWuBBccK7hBRXvY-3D



New Defects reported by Coverity Scan for LibreOffice

2024-06-04 Thread scan-admin
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.
3 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 2 of 2 defect(s)


** CID 1603200:  Uninitialized variables  (UNINIT)



*** CID 1603200:  Uninitialized variables  (UNINIT)
/sc/source/filter/excel/xelink.cxx: 2022 in 
::XclExpSupbookBuffer::InsertDde(const rtl::OUString &, const 
rtl::OUString &, const rtl::OUString &)()
2016 xSupbook = new XclExpSupbook( GetRoot(), rApplic, rTopic );
2017 nSupbook = Append(xSupbook);
2018 }
2019 auto nExtName = xSupbook->InsertDde( rItem );
2020 if (nExtName > 0)
2021 {
>>> CID 1603200:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "nSupbook" when calling "make_pair".
2022 return std::make_pair(nSupbook, nExtName);
2023 }
2024 return {};
2025 }
2026 
2027 std::optional> 
XclExpSupbookBuffer::InsertExtName( const OUString& rUrl,

** CID 1603199:  Uninitialized variables  (UNINIT)



*** CID 1603199:  Uninitialized variables  (UNINIT)
/sc/source/filter/excel/xelink.cxx: 2041 in 
::XclExpSupbookBuffer::InsertExtName(const rtl::OUString &, const 
rtl::OUString &, const std::shared_ptr &)()
2035 nSupbook = Append(xSupbook);
2036 }
2037 
2038 auto nExtName = xSupbook->InsertExtName(rName, rArray);
2039 if (nExtName > 0)
2040 {
>>> CID 1603199:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "nSupbook" when calling "make_pair".
2041 return std::make_pair(nSupbook, nExtName);
2042 }
2043 return {};
2044 }
2045 
2046 XclExpXti XclExpSupbookBuffer::GetXti( sal_uInt16 nFileId, const 
OUString& rTabName, sal_uInt16 nXclTabSpan,



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DWDrN_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtS6TN8LX7QGFG9uikw6XI2zN6rAMQYUUfPYNRE04m2gT7LFO3nhJadEx-2BHqJuW4uZbbcOK6zeVIY4kkYzITeyFlubFnkVSvt4Po-2Brl121K2zZLBYbThYE4q0hsKXqbcwnv-2FeYx2fSQ-2BYc7GiOjnUH6htvBxT6CAQ66SqWGsdX9-2FU-3D



New Defects reported by Coverity Scan for LibreOffice

2024-06-01 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

9 new defect(s) introduced to LibreOffice found with Coverity Scan.
10 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 9 of 9 defect(s)


** CID 1602450:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1602450:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/filter/ww8/wrtww8gr.cxx: 149 in WW8Export::TestOleNeedsGraphic(const 
SwAttrSet &, const rtl::Reference &, const 
rtl::Reference &, const rtl::OUString &, SwOLENode *)()
143 0,
144 nAspect,
145 m_pWriter->GetBaseURL());
146 
147 if (pRet)
148 {
>>> CID 1602450:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pOLENd->GetOLEObj()" to "GetOleRef", which 
>>> dereferences it.
149 uno::Reference< embed::XEmbeddedObject > xObj = 
pOLENd->GetOLEObj().GetOleRef();
150 if ( xObj.is() )
151 {
152 std::unique_ptr pGraphicStream;
153 comphelper::EmbeddedObjectContainer aCnt( 
m_rDoc.GetDocStorage() );
154 try

** CID 1602449:  Resource leaks  (RESOURCE_LEAK)
/sw/source/core/doc/docsort.cxx: 457 in SwDoc::SortText(const SwPaM &, const 
SwSortOptions &)()



*** CID 1602449:  Resource leaks  (RESOURCE_LEAK)
/sw/source/core/doc/docsort.cxx: 457 in SwDoc::SortText(const SwPaM &, const 
SwSortOptions &)()
451 GetIDocumentUndoRedo().DoUndo( bUndo );
452 if( bUndo )
453 {
454 GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
455 }
456 
>>> CID 1602449:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pRedlUndo" going out of scope leaks the storage it points to.
457 return true;
458 }
459 
460 /// Sort Table in the Document
461 bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& 
rOpt)
462 {

** CID 1602448:  Error handling issues  (CHECKED_RETURN)
/sw/source/filter/html/htmlplug.cxx: 837 in SwHTMLParser::NewObject()()



*** CID 1602448:  Error handling issues  (CHECKED_RETURN)
/sw/source/filter/html/htmlplug.cxx: 837 in SwHTMLParser::NewObject()()
831 
832 m_pAppletImpl->SetAltText( aStandBy );
833 
834 SfxItemSet aItemSet( m_xDoc->GetAttrPool(), 
m_pCSS1Parser->GetWhichMap() );
835 SvxCSS1PropertyInfo aPropInfo;
836 if( HasStyleOptions( aStyle, aId, aClass ) )
>>> CID 1602448:  Error handling issues  (CHECKED_RETURN)
>>> Calling "ParseStyleOptions" without checking return value (as is done 
>>> elsewhere 18 out of 22 times).
837 ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
838 
839 SfxItemSet& rFrameSet = m_pAppletImpl->GetItemSet();
840 if( !IsNewDoc() )
841 Reader::ResetFrameFormatAttrs( rFrameSet );
842 

** CID 1602447:  Error handling issues  (CHECKED_RETURN)
/sw/source/filter/html/htmlgrin.cxx: 566 in SwHTMLParser::InsertImage()()



*** CID 1602447:  Error handling issues  (CHECKED_RETURN)
/sw/source/filter/html/htmlgrin.cxx: 566 in SwHTMLParser::InsertImage()()
560 }
561 }
562 
563 SfxItemSet aItemSet( m_xDoc->GetAttrPool(), 
m_pCSS1Parser->GetWhichMap() );
564 SvxCSS1PropertyInfo aPropInfo;
565 if( HasStyleOptions( aStyle, aId, aClass ) )
>>> CID 1602447:  Error handling issues  (CHECKED_RETURN)
>>> Calling "ParseStyleOptions" without checking return value (as is done 
>>> elsewhere 18 out of 22 times).
566 ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
567 
568 SfxItemSetFixed aFrameSet( 
m_xDoc->GetAttrPool() );
569 if( !IsNewDoc() )
570 Reader::ResetFrameFormatAttrs( aFrameSet );
571 

** CID 1602446:  Error handling issues  (CHECKED_RETURN)
/sc/source/core/tool/dbdata.cxx: 1601 in ScDBCollection::CopyToTable(short, 
short)()



*** CID 1602446:  Error handling issues  (CHECKED_RETURN)
/sc/source/core/tool/dbdata.cxx: 1601 in ScDBCollection::CopyToTable(short, 
short)()
1595 for (const auto& rxNamedDB : aTemp)
1596 {
1597 const OUString newName( lcl_IncrementNumberInNamedRange( 
maNamedDBs, rxNamedDB->GetName()));
1598 std::unique_ptr pD

New Defects reported by Coverity Scan for LibreOffice

2024-05-24 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
2 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 1 of 1 defect(s)


** CID 1598442:(NULL_RETURNS)



*** CID 1598442:(NULL_RETURNS)
/sc/source/ui/undo/undotab.cxx: 478 in ScUndoDeleteTab::Redo()()
472 pViewShell->SetTabNo( lcl_GetVisibleTabBefore( rDoc, theTabs[0] 
), true );
473 }
474 
475 void ScUndoDeleteTab::Redo()
476 {
477 ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
>>> CID 1598442:(NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pViewShell" when 
>>> calling "SetTabNo".
478 pViewShell->SetTabNo( lcl_GetVisibleTabBefore( 
pDocShell->GetDocument(), theTabs.front() ) );
479 
480 RedoSdrUndoAction( pDrawUndo.get() );   // Draw Redo first
481 
482 pDocShell->SetInUndo( true );   //! BeginRedo
483 bDrawIsInUndo = true;
/sc/source/ui/undo/undotab.cxx: 494 in ScUndoDeleteTab::Redo()()
488 SetChangeTrack();
489 
490 if (comphelper::LibreOfficeKit::isActive() && !theTabs.empty())
491 {
492 ScDocument& rDoc = pDocShell->GetDocument();
493 lcl_OnTabsChanged(pViewShell, rDoc, theTabs[0]);
>>> CID 1598442:(NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pViewShell" when 
>>> calling "lcl_UndoCommandResult".
494 lcl_UndoCommandResult(pViewShell, ".uno:Redo", 
"ScUndoDeleteTab", &theTabs);
495 }
496 
497 //  SetTabNo(...,sal_True) for all views to sync with drawing layer 
pages
498 pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) );
499 }



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D8GvR_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtRs21SpJYxmEuHcCNhcR6c2tEPVHJ65guYKM4Ndwr1MNRYtDZQIeZ4FHqrwgR8A6a-2FMtHkLxB9P7Tg9BlmL8Gb9lHdjjuhjwxanr82a-2BkpDGYn65fZ6MLs77Qcl3YijxYNKlME2ihprY0BQiI4eijTqQqpdrlmTegCjwXIpHHorM-3D



New Defects reported by Coverity Scan for LibreOffice

2024-05-18 Thread scan-admin
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.
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 2 of 2 defect(s)


** CID 1598293:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unotbl.cxx: 2716 in 
SwXTextTable::getPropertyValue(const rtl::OUString &)()



*** CID 1598293:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unotbl.cxx: 2716 in 
SwXTextTable::getPropertyValue(const rtl::OUString &)()
2710 }
2711 break;
2712 
2713 case  FN_UNO_ANCHOR_TYPES:
2714 case  FN_UNO_TEXT_WRAP:
2715 case  FN_UNO_ANCHOR_TYPE:
>>> CID 1598293:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetDefaultTextContentValue" without checking return value (as 
>>> is done elsewhere 8 out of 10 times).
2716 ::sw::GetDefaultTextContentValue(
2717 aRet, u"", pEntry->nWID);
2718 break;
2719 
2720 case FN_UNO_RANGE_ROW_LABEL:
2721 {

** CID 1598292:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unosect.cxx: 1610 in 
SwXTextSection::getPropertyDefault(const rtl::OUString &)()



*** CID 1598292:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unosect.cxx: 1610 in 
SwXTextSection::getPropertyDefault(const rtl::OUString &)()
1604 case WID_SECT_EDIT_IN_READONLY:
1605 aRet <<= false;
1606 break;
1607 case  FN_UNO_ANCHOR_TYPES:
1608 case  FN_UNO_TEXT_WRAP:
1609 case  FN_UNO_ANCHOR_TYPE:
>>> CID 1598292:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetDefaultTextContentValue" without checking return value (as 
>>> is done elsewhere 8 out of 10 times).
1610 ::sw::GetDefaultTextContentValue(aRet, u"", pEntry->nWID);
1611 break;
1612 default:
1613 if(pFormat && SfxItemPool::IsWhich(pEntry->nWID))
1614 {
1615 SwDoc *const pDoc = pFormat->GetDoc();



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D5zYB_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtKmWXHLXD2K1QR2E0we2gMn5wcMxInQlUK6dDYna68JKILfgHJ5fmdUrDHNAjyeGutssgC6UiOf3tTplNaaWmgR4ovfqIIraxT06EMYD0X41RbLLR5QRgxgg7vjSA-2F1Ed1jqyi5AINm1rErKe3iTaVZYIE5torCQxPe-2BzmomAgj4-3D



New Defects reported by Coverity Scan for LibreOffice

2024-05-17 Thread scan-admin
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.
5 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 1598237:  Error handling issues  (UNCAUGHT_EXCEPT)
/canvas/workben/canvasdemo.cxx: 608 in ::DemoApp::Main()()



*** CID 1598237:  Error handling issues  (UNCAUGHT_EXCEPT)
/canvas/workben/canvasdemo.cxx: 608 in ::DemoApp::Main()()
602 void Init() override;
603 void DeInit() override;
604 };
605 
606 }
607 
>>> CID 1598237:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> In function "::DemoApp::Main()" an exception of type 
>>> "com::sun::star::uno::DeploymentException" is thrown and never caught.
608 int DemoApp::Main()
609 {
610 bool bHelp = false;
611 
612 for( unsigned int i = 0; i < GetCommandLineParamCount(); i++ )
613 {

** CID 1598236:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/app/apphdl.cxx: 417 in 
::SwMailMergeWizardExecutor::ExecuteMailMergeWizard(const SfxItemSet 
*)()



*** CID 1598236:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/app/apphdl.cxx: 417 in 
::SwMailMergeWizardExecutor::ExecuteMailMergeWizard(const SfxItemSet 
*)()
411 using namespace org::freedesktop::PackageKit;
412 using namespace svtools;
413 css::uno::Reference< XSyncDbusSessionHelper > 
xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()));
414 const css::uno::Sequence< OUString > vPackages{ 
"libreoffice-base" };
415 xSyncDbusSessionHelper->InstallPackageNames(vPackages, 
OUString());
416 SolarMutexGuard aGuard;
>>> CID 1598236:  Error handling issues  (CHECKED_RETURN)
>>> Calling "executeRestartDialog" without checking return value (as is 
>>> done elsewhere 6 out of 7 times).
417 
executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, 
RESTART_REASON_MAILMERGE_INSTALL);
418 }
419 catch (const css::uno::Exception &)
420 {
421 TOOLS_INFO_EXCEPTION(
422 "sw.core",

** CID 1598235:  Uninitialized members  (UNINIT_CTOR)
/sd/source/ui/framework/module/NotesPaneModule.cxx: 45 in 
sd::framework::NotesPaneModule::NotesPaneModule(const 
rtl::Reference &)()



*** CID 1598235:  Uninitialized members  (UNINIT_CTOR)
/sd/source/ui/framework/module/NotesPaneModule.cxx: 45 in 
sd::framework::NotesPaneModule::NotesPaneModule(const 
rtl::Reference &)()
39 NotesPaneModule::NotesPaneModule(const 
rtl::Reference<::sd::DrawController>& rxController)
40 : mxBottomImpressPaneId(FrameworkHelper::CreateResourceId(
41   FrameworkHelper::msNotesPanelViewURL, 
FrameworkHelper::msBottomImpressPaneURL))
42 , 
mxMainViewAnchorId(FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL))
43 {
44 if (!rxController.is())
>>> CID 1598235:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mpViewShellBase" is not initialized in this 
>>> constructor nor in any functions that it calls.
45 return;
46 
47 mpViewShellBase = rxController->GetViewShellBase();
48 
49 mxConfigurationController = 
rxController->getConfigurationController();
50 if (!mxConfigurationController.is())



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DUNj__A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGt2K6Hw1GZzA8I67sWF7NG-2BWh2ziA0r8iMXl5wP1qzlfk0Dfqxvgy-2FkqoVaqRqr41NGqxPEjODcl0dG35QNb05uV-2Bnp1CQtO-2B-2BhlHqfXVc8i6Kdeb6DZDPH7nawi1mFkZK9c4xfec5YCSIaJZlPEKtGzv-2BF3fRk2xfl6wFahW9qXc-3D



New Defects reported by Coverity Scan for LibreOffice

2024-05-12 Thread scan-admin
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.
3 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 1597307:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/misc/asyncmodaldialog.cxx: 68 in 
dbauiDialogExecutor_Impl::onExecute(void *)()



*** CID 1597307:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/misc/asyncmodaldialog.cxx: 68 in 
dbauiDialogExecutor_Impl::onExecute(void *)()
62 }
63 
64 IMPL_LINK_NOARG( DialogExecutor_Impl, onExecute, void*, void )
65 {
66 try
67 {
>>> CID 1597307:  Error handling issues  (CHECKED_RETURN)
>>> Calling "execute" without checking return value (as is done elsewhere 
>>> 32 out of 39 times).
68 m_xDialog->execute();
69 }
70 catch( const Exception& )
71 {
72 DBG_UNHANDLED_EXCEPTION("dbaccess");
73 }

** CID 1597306:  Error handling issues  (CHECKED_RETURN)
/svx/source/form/fmshimp.cxx: 1394 in 
FmXFormShell::ExecuteTabOrderDialog_Lock(const 
com::sun::star::uno::Reference &)()



*** CID 1597306:  Error handling issues  (CHECKED_RETURN)
/svx/source/form/fmshimp.cxx: 1394 in 
FmXFormShell::ExecuteTabOrderDialog_Lock(const 
com::sun::star::uno::Reference &)()
1388 
1389 Reference< dialogs::XExecutableDialog > xDialog = 
form::TabOrderDialog::createWithModel(
1390 comphelper::getProcessComponentContext(),
1391 _rxForForm, getControlContainerForView_Lock(), 
xParentWindow
1392 );
1393 
>>> CID 1597306:  Error handling issues  (CHECKED_RETURN)
>>> Calling "execute" without checking return value (as is done elsewhere 
>>> 32 out of 39 times).
1394 xDialog->execute();
1395 }
1396 catch( const Exception& )
1397 {
1398 TOOLS_WARN_EXCEPTION( "svx", 
"FmXFormShell::ExecuteTabOrderDialog" );
1399 }

** CID 1597305:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/app/scmod.cxx: 535 in ScModule::Execute(SfxRequest &)()



*** CID 1597305:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/app/scmod.cxx: 535 in ScModule::Execute(SfxRequest &)()
529 
530 case SID_OPEN_XML_FILTERSETTINGS:
531 {
532 try
533 {
534 css::uno::Reference < 
css::ui::dialogs::XExecutableDialog > xDialog = 
css::ui::dialogs::XSLTFilterDialog::create( 
::comphelper::getProcessComponentContext());
>>> CID 1597305:  Error handling issues  (CHECKED_RETURN)
>>> Calling "execute" without checking return value (as is done elsewhere 
>>> 32 out of 39 times).
535 xDialog->execute();
536 }
537 catch( css::uno::RuntimeException& )
538 {
539 DBG_UNHANDLED_EXCEPTION("sc.ui");
540 }

** CID 1597304:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/misc/TableCopyHelper.cxx: 110 in 
dbaui::OTableCopyHelper::insertTable(std::basic_string_view>, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &, int, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Sequence &, bool, 
std::basic_string_view>, const 
com::sun::star::uno::Reference &)()



*** CID 1597304:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/misc/TableCopyHelper.cxx: 110 in 
dbaui::OTableCopyHelper::insertTable(std::basic_string_view>, const 
com::sun::star::uno::Reference &, const 
rtl::OUString &, int, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Sequence &, bool, 
std::basic_string_view>, const 
com::sun::star::uno::Reference &)()
104 OUString sTableNameForAppend( GetTableNameForAppend() );
105 xWizard->setDestinationTableName( GetTableNameForAppend() );
106 
107 bool bAppendToExisting = !sTableNameForAppend.isEmpty();
108 xWizard->setOperation( bAppendToExisting ? 
CopyTableOperation::AppendData : CopyTableOperation::CopyDefinitionAndData );
109 
>>> CID 1597304:  Error handling issues  (CHECKED_RETURN)
>>> Calling "execute" without checking return value (as is done elsewhere 
>>> 32 out of 39 times).
110 xWizard->execute();
111 }

New Defects reported by Coverity Scan for LibreOffice

2024-05-11 Thread scan-admin
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.
13 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 2 of 2 defect(s)


** CID 1597280:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1597280:  Null pointer dereferences  (NULL_RETURNS)
/lotuswordpro/source/filter/lwptablelayout.cxx: 935 in 
LwpTableLayout::SplitRowToCells(XFTable *, const rtl::Reference &, 
unsigned char, const unsigned char *)()
929 if (pTempRowStyle)
930 *xRowStyle = *pTempRowStyle;
931 
932 for (i=1;i<=nRowNum;i++)
933 {
934 styleName = pTmpTable->GetRow(i)->GetStyleName();
>>> CID 1597280:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "static_cast>> *>(pXFStyleManager->FindStyle(styleName.operator std::u16string_view()))" 
>>> when calling "GetRowHeight".
935 
fHeight+=static_cast(pXFStyleManager->FindStyle(styleName))->GetRowHeight();
936 }
937 if (m_nDirection & 0x0030)
938 {
939 xRowStyle->SetMinRowHeight(static_cast(fHeight));
940 }

** CID 1597279:  Error handling issues  (CHECKED_RETURN)
/oox/source/ole/olehelper.cxx: 529 in 
oox::ole::MSConvertOCXControls::WriteOCXExcelKludgeStream(const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::awt::Size &, rtl::OUString &)()



*** CID 1597279:  Error handling issues  (CHECKED_RETURN)
/oox/source/ole/olehelper.cxx: 529 in 
oox::ole::MSConvertOCXControls::WriteOCXExcelKludgeStream(const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::awt::Size &, rtl::OUString &)()
523 {
524 OleFormCtrlExportHelper exportHelper( 
comphelper::getProcessComponentContext(), rxModel, rxControlModel );
525 if ( !exportHelper.isValid() )
526 return false;
527 rName = exportHelper.getTypeName();
528 SvGlobalName aName;
>>> CID 1597279:  Error handling issues  (CHECKED_RETURN)
>>> Calling "MakeId" without checking return value (as is done elsewhere 6 
>>> out of 7 times).
529 aName.MakeId(exportHelper.getGUID());
530 BinaryXOutputStream aOut( xOutStrm, false );
531 OleHelper::exportGuid( aOut, aName );
532 exportHelper.exportControl( xOutStrm, rSize );
533 return true;
534 }



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D3CZ__A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtuF1AFWGXklFo3pPNXqNmp2eiKqr53jjPXurINB4FVmRqE7kg1sWEWW2USGT1a7TXqrldQe606OwlNpWkz7LdKZVGkF06e7LQ5W5uRVnX-2F-2FAIaJwL8gO9vSq5WxXwbKtfdLYXH009YA7HorjX4ZyjRNKpoh8JStSS5fchWWqYdjo-3D



New Defects reported by Coverity Scan for LibreOffice

2024-05-09 Thread scan-admin
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.
14 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 2 of 2 defect(s)


** CID 1597274:  Incorrect expression  (IDENTICAL_BRANCHES)
/sd/source/ui/app/sdmod2.cxx: 735 in SdModule::ApplyItemSet(unsigned short, 
const SfxItemSet &)()



*** CID 1597274:  Incorrect expression  (IDENTICAL_BRANCHES)
/sd/source/ui/app/sdmod2.cxx: 735 in SdModule::ApplyItemSet(unsigned short, 
const SfxItemSet &)()
729 
730 // Only if also the document type matches...
731 if( pDocSh && pDoc && eDocType == pDoc->GetDocumentType() )
732 {
733 FieldUnit eUIUnit;
734 SvtSysLocale aSysLocale;
>>> CID 1597274:  Incorrect expression  (IDENTICAL_BRANCHES)
>>> The same code is executed regardless of whether "eDocType == 
>>> DocumentType::Impress" is true, because the 'then' and 'else' branches are 
>>> identical. Should one of the branches be modified, or the entire 'if' 
>>> statement replaced?
735 if (eDocType == DocumentType::Impress)
736 if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() 
== MeasurementSystem::Metric)
737 eUIUnit = 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::Metric::get());
738 else
739 eUIUnit = 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::get());
740 else

** CID 1597273:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/browser/unodatbr.cxx: 2162 in 
dbaui::SbaTableQueryBrowser::OnExpandEntry(const weld::TreeIter &)()



*** CID 1597273:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/browser/unodatbr.cxx: 2162 in 
dbaui::SbaTableQueryBrowser::OnExpandEntry(const weld::TreeIter &)()
2156 if (etTableContainer == pData->eType)
2157 {
2158 weld::WaitObject aWaitCursor(getFrameWeld());
2159 
2160 // it could be that we already have a connection
2161 SharedConnection xConnection;
>>> CID 1597273:  Error handling issues  (CHECKED_RETURN)
>>> Calling "ensureConnection" without checking return value (as is done 
>>> elsewhere 4 out of 5 times).
2162 ensureConnection(xFirstParent.get(), xConnection);
2163 
2164 if ( xConnection.is() )
2165 {
2166 SQLExceptionInfo aInfo;
2167 try



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DyvG3_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtKcSBmBEvTNeRuiIvP564cBNHH-2BnkseL5EtBP-2BeZzQbE1g97Np-2BpvZKquT0r5hu-2FR0xG2hOM4vNeYySn05u6OrlYAsxbmWDQfrI7UK8gKm0ghYRf9KG90CCzmk2fLGZk-2FmvpozqJ-2FWmGrXV21IxRBwyOAk2EDdxDyVQ1S9tg8wTY-3D



New Defects reported by Coverity Scan for LibreOffice

2024-05-06 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
2 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 1 of 1 defect(s)


** CID 1596888:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1596888:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/app/scmod.cxx: 233 in 
ScModule::ConfigurationChanged(utl::ConfigurationBroadcaster *, 
ConfigurationHints)()
227 const bool bUnchanged(aViewRenderingOptions == 
pViewShell->GetViewRenderingData());
228 if (!bUnchanged)
229 
pViewShell->SetViewRenderingData(aViewRenderingOptions);
230 ScModelObj* pScModelObj = nullptr;
231 if (SfxObjectShell* pCurrentSh = 
SfxObjectShell::Current())
232 pScModelObj = 
comphelper::getFromUnoTunnel(pCurrentSh->GetModel());
>>> CID 1596888:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pScModelObj" to "notifyViewRenderState", which 
>>> dereferences it.
233 SfxLokHelper::notifyViewRenderState(pViewShell, 
pScModelObj);
234 // In Online, the document color is the one used for 
the background, contrary to
235 // Writer and Draw that use the application background 
color.
236 
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR,
237 aFillColor.AsRGBHexString().toUtf8());
238 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D4S96_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtmY-2BVlqDvJQT99MURjAhHNhswJEGZtztX6sqICD-2BLQZMg4pY9-2BKEDc1hvT6plFRP6OmCd37paMxRoWtAmbgM4rcUBwDRhheUmjeXHzJuQfIbO0csvdoYhIbf5w3zrhUQxwEeWCwCdfvqcch3DEB35g6MopW8lNSgMkEAZRKWqU9w-3D



New Defects reported by Coverity Scan for LibreOffice

2024-05-04 Thread scan-admin
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.
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 2 of 2 defect(s)


** CID 1596834:  Incorrect expression  (IDENTICAL_BRANCHES)
/sw/source/core/bastyp/calc.cxx: 127 in OperatorCompare(const void *, const 
void *)()



*** CID 1596834:  Incorrect expression  (IDENTICAL_BRANCHES)
/sw/source/core/bastyp/calc.cxx: 127 in OperatorCompare(const void *, const 
void *)()
121 extern "C" {
122 static int OperatorCompare( const void *pFirst, const void *pSecond)
123 {
124 int nRet = 0;
125 if( CALC_NAME == static_cast(pFirst)->eOp )
126 {
>>> CID 1596834:  Incorrect expression  (IDENTICAL_BRANCHES)
>>> The same code is executed regardless of whether "CALC_NAME == 
>>> static_cast(pSecond)->eOp" is true, because the 'then' and 
>>> 'else' branches are identical. Should one of the branches be modified, or 
>>> the entire 'if' statement replaced?
127 if( CALC_NAME == static_cast(pSecond)->eOp )
128 nRet = static_cast(pFirst)->aName.compareTo(
129 static_cast(pSecond)->aName );
130 else
131 nRet = static_cast(pFirst)->aName.compareTo(
132  static_cast(pSecond)->aName );

** CID 1596833:  Uninitialized members  (UNINIT_CTOR)
/svgio/source/svgreader/svgstyleattributes.cxx: 1299 in 
svgio::svgreader::SvgStyleAttributes::SvgStyleAttributes(svgio::svgreader::SvgNode
 &)()



*** CID 1596833:  Uninitialized members  (UNINIT_CTOR)
/svgio/source/svgreader/svgstyleattributes.cxx: 1299 in 
svgio::svgreader::SvgStyleAttributes::SvgStyleAttributes(svgio::svgreader::SvgNode
 &)()
1293 maBaselineShiftNumber(0),
1294 maDominantBaseline(DominantBaseline::Auto),
1295 maResolvingParent(33, 0),
1296 mbStrokeDasharraySet(false),
1297 mbContextStroke(false)
1298 {
>>> CID 1596833:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "maContextStroke" is not initialized in this 
>>> constructor nor in any functions that it calls.
1299 }
1300 
1301 SvgStyleAttributes::~SvgStyleAttributes()
1302 {
1303 }
1304 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DlzJ__A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtOnfJZXHZ0I-2BqvltHif1tKV6yUEK1nhCUEgrcGEHrlPYeDXLVLxGWnFQ4LOE4envtKartEpNvFsISrxil-2FMFDR5UkOz-2F2yuhJwW5QIoF7buabPX8X61cIlC6IfrAucuT4myWy7ENT7GeX7IaV6w5R4Pc-2F0sINIUWmfjVGhSgs6K0-3D



New Defects reported by Coverity Scan for LibreOffice

2024-05-03 Thread scan-admin
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.
5 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 1585038:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 2943 in 
boost::container::vector,
 
boost::container::small_vector_allocator,
 boost::container::new_allocator, void>, 
void>::priv_insert_forward_range_expand_forward,
 boost::container::new_allocator, void>, 
boost::container::vec_iterator
 *, (bool)1>, std::shared_ptr 
*>>(std::shared_ptr *, 
unsigned long, T1, boost::move_detail::integral_constant)()



*** CID 1585038:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 2943 in 
boost::container::vector,
 
boost::container::small_vector_allocator,
 boost::container::new_allocator, void>, 
void>::priv_insert_forward_range_expand_forward,
 boost::container::new_allocator, void>, 
boost::container::vec_iterator
 *, (bool)1>, std::shared_ptr 
*>>(std::shared_ptr *, 
unsigned long, T1, boost::move_detail::integral_constant)()
2937 
2938template 
2939BOOST_CONTAINER_FORCEINLINE void 
priv_insert_forward_range_expand_forward(T* const raw_pos, const size_type n, 
InsertionProxy insert_range_proxy, dtl::false_type)
2940{
2941   //There is enough memory
2942   boost::container::expand_forward_and_insert_alloc
>>> CID 1585038:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "insert_range_proxy" is passed-by-value as parameter to 
>>> "expand_forward_and_insert_alloc" when it could be moved instead.
2943  ( this->m_holder.alloc(), raw_pos, this->priv_raw_end(), n, 
insert_range_proxy);
2944   this->m_holder.inc_stored_size(n);
2945}
2946 
2947template 
2948void priv_insert_forward_range_new_allocation

** CID 1584285:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 2957 in 
boost::container::vector,
 
boost::container::small_vector_allocator,
 boost::container::new_allocator, void>, 
void>::priv_insert_forward_range_new_allocation,
 boost::container::new_allocator, void>, 
boost::container::vec_iterator
 *, (bool)1>, std::shared_ptr 
*>>(std::shared_ptr *, 
unsigned long, 
std::shared_ptr *, unsigned 
long, T1)()



*** CID 1584285:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 2957 in 
boost::container::vector,
 
boost::container::small_vector_allocator,
 boost::container::new_allocator, void>, 
void>::priv_insert_forward_range_new_allocation,
 boost::container::new_allocator, void>, 
boost::container::vec_iterator
 *, (bool)1>, std::shared_ptr 
*>>(std::shared_ptr *, 
unsigned long, 
std::shared_ptr *, unsigned 
long, T1)()
2951   //n can be zero, if we want to reallocate!
2952   allocator_type &a =  this->m_holder.alloc();
2953   T * const raw_old_buffer = this->priv_raw_begin();
2954 
2955   typename value_traits::ArrayDeallocator 
new_buffer_deallocator(new_start, a, new_cap);
2956   boost::container::uninitialized_move_and_insert_alloc
>>> CID 1584285:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "insert_range_proxy" is passed-by-value as parameter to 
>>> "uninitialized_move_and_insert_alloc" when it could be moved instead.
2957  (a, raw_old_buffer, pos, this->priv_raw_end(), new_start, n, 
insert_range_proxy);
2958   new_buffer_deallocator.release();
2959 
2960   //Destroy and deallocate old elements
2961   if(raw_old_buffer){
2962  
BOOST_IF_CONSTEXPR(!has_trivial_destructor_after_move::value)

** CID 1583837:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 1985 in 
boost::container::vector,
 
boost::container::small_vector_allocator,
 boost::container::new_allocator, void>, 
void>::insert
 *, 
(bool)1>>(boost::container::vec_iterator
 *, (bool)1>, T1, T1, boost::move_detail::disable_if_or, 
boost::container::dtl::is_input_iterator::value)>, 
boost::move_detail::bool_<(bool)0>, boost::move_detail::bool_<(bool)0>>::type 
*)()



*** CID 1583837:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 1985 in 
boost::container::vector,
 
boost::container::small_vector_allocator,
 boost::container::new_allocator, void>, 
void>::insert
 *, 
(bool)1>>(boost::contain

New Defects reported by Coverity Scan for LibreOffice

2024-05-01 Thread scan-admin
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.
11 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 1596707:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1596707:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/view/frmview.cxx: 286 in sd::FrameView::Update(const SdOptions 
*)()
280 {
281 if (!pOptions)
282 return;
283 
284 SdDrawDocument* pDrawDocument = 
dynamic_cast(&GetModel());
285 
>>> CID 1596707:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pDrawDocument" to "GetDocumentType", which 
>>> dereferences it.
286 if (pDrawDocument->GetDocumentType() == DocumentType::Impress)
287 {
288 mbRuler = 
officecfg::Office::Impress::Layout::Display::Ruler::get();
289 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
290 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
291 }

** CID 1596706:  Null pointer dereferences  (FORWARD_NULL)
/tools/source/fsys/urlobj.cxx: 2285 in INetURLObject::getPrefix(const char16_t 
*&, const char16_t *)()



*** CID 1596706:  Null pointer dereferences  (FORWARD_NULL)
/tools/source/fsys/urlobj.cxx: 2285 in INetURLObject::getPrefix(const char16_t 
*&, const char16_t *)()
2279 pMatch = pFirst++;
2280 pMatched = p;
2281 }
2282 if (p >= pEnd)
2283 break;
2284 sal_uInt32 nChar = rtl::toAsciiLowerCase(*p++);
>>> CID 1596706:  Null pointer dereferences  (FORWARD_NULL)
>>> Dereferencing null pointer "pFirst->m_pPrefix".
2285 while (pFirst <= pLast && static_cast(pFirst->m_pPrefix[i]) < nChar)
2286 ++pFirst;
2287 while (pFirst <= pLast && static_cast(pLast->m_pPrefix[i]) > nChar)
2288 --pLast;
2289 }
2290 if (pFirst == pLast)

** CID 1596705:  Code maintainability issues  (UNUSED_VALUE)
/basegfx/source/polygon/b2dpolygontools.cxx: 3371 in 
basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon(const 
com::sun::star::uno::Sequence &, const 
com::sun::star::uno::Sequence &)()



*** CID 1596705:  Code maintainability issues  (UNUSED_VALUE)
/basegfx/source/polygon/b2dpolygontools.cxx: 3371 in 
basegfx::utils::UnoPolygonBezierCoordsToB2DPolygon(const 
com::sun::star::uno::Sequence &, const 
com::sun::star::uno::Sequence &)()
3365 {
3366 aControlB = aNewCoordinatePair;
3367 bControlB = true;
3368 
3369 // get next point and flag
3370 aNewCoordinatePair = 
B2DPoint(rPointSequenceSource[b].X, rPointSequenceSource[b].Y);
>>> CID 1596705:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value from "rFlagSequenceSource[b]" to "ePolygonFlag" here, 
>>> but that stored value is overwritten before it can be used.
3371 ePolygonFlag = rFlagSequenceSource[b];
3372 b++;
3373 }
3374 
3375 // two or no control points are consumed, another 
one would be an error.
3376 // It's also an error if only one control point 
was read

** CID 1596704:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/xmlsecurity/source/gpg/CertificateImpl.cxx: 226 in 
CertificateImpl::setCertificate(std::shared_ptr, const 
GpgME::Key &)()



*** CID 1596704:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/xmlsecurity/source/gpg/CertificateImpl.cxx: 226 in 
CertificateImpl::setCertificate(std::shared_ptr, const 
GpgME::Key &)()
220 return KeyUsage::DIGITAL_SIGNATURE | KeyUsage::NON_REPUDIATION  | 
KeyUsage::KEY_ENCIPHERMENT | KeyUsage::DATA_ENCIPHERMENT;
221 }
222 
223 void CertificateImpl::setCertificate(std::shared_ptr 
ctx, const GpgME::Key& key)
224 {
225 m_pKey = key;
>>> CID 1596704:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "ctx" is copied in a call to copy assignment "operator =", when it 
>>> could be moved instead.
226 m_pContext = ctx;
227 }
228 
229 const GpgME::Key* CertificateImpl::getCertificate() const
230 {
231 r

New Defects reported by Coverity Scan for LibreOffice

2024-04-29 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)


** CID 1596697:(FORWARD_NULL)



*** CID 1596697:(FORWARD_NULL)
/sc/source/ui/miscdlgs/inscldlg.cxx: 99 in 
ScInsertCellDlg::ScInsertCellDlg(weld::Window *, bool)()
93 break;
94 }
95 }
96 
97 // if some cells are selected, then disable the SpinButtons
98 m_xNumberOfCols->set_sensitive(bColCount && 
!pViewData->GetMarkData().IsMarked());
>>> CID 1596697:(FORWARD_NULL)
>>> Passing null pointer "pViewData->GetMarkData()" to "IsMarked", which 
>>> dereferences it.
99 m_xNumberOfRows->set_sensitive(bRowsCount && 
!pViewData->GetMarkData().IsMarked());
100 }
101 
102 ScInsertCellDlg::~ScInsertCellDlg() {}
103 
104 InsCellCmd ScInsertCellDlg::GetInsCellCmd() const
/sc/source/ui/miscdlgs/inscldlg.cxx: 98 in 
ScInsertCellDlg::ScInsertCellDlg(weld::Window *, bool)()
92 bColCount = true;
93 break;
94 }
95 }
96 
97 // if some cells are selected, then disable the SpinButtons
>>> CID 1596697:(FORWARD_NULL)
>>> Passing null pointer "pViewData->GetMarkData()" to "IsMarked", which 
>>> dereferences it.
98 m_xNumberOfCols->set_sensitive(bColCount && 
!pViewData->GetMarkData().IsMarked());
99 m_xNumberOfRows->set_sensitive(bRowsCount && 
!pViewData->GetMarkData().IsMarked());
100 }
101 
102 ScInsertCellDlg::~ScInsertCellDlg() {}
103 

** CID 1596696:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/slideshow/source/engine/shapes/drawshape.cxx: 1282 in 
slideshow::internal::DelayedGraphicLoader::DelayedGraphicLoader(std::shared_ptr)()



*** CID 1596696:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/slideshow/source/engine/shapes/drawshape.cxx: 1282 in 
slideshow::internal::DelayedGraphicLoader::DelayedGraphicLoader(std::shared_ptr)()
1276 {
1277 mpGraphicLoader.reset();
1278 }
1279 }
1280 
1281 
DelayedGraphicLoader::DelayedGraphicLoader(std::shared_ptr pGraphic)
>>> CID 1596696:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "pGraphic" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
1282 : mpGraphic(pGraphic)
1283 , mpVDevMask(DeviceFormat::WITHOUT_ALPHA)
1284 {
1285 }
1286 }
1287 

** CID 1596695:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/slideshow/source/engine/shapes/drawshape.cxx: 575 in 
slideshow::internal::DrawShape::create(const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, double, 
std::shared_ptr, const slideshow::internal::SlideShowContext &)()



*** CID 1596695:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/slideshow/source/engine/shapes/drawshape.cxx: 575 in 
slideshow::internal::DrawShape::create(const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, double, 
std::shared_ptr, const slideshow::internal::SlideShowContext &)()
569 std::shared_ptrpGraphic,
570 const SlideShowContext& rContext )
571 {
572 DrawShapeSharedPtr pShape( new DrawShape(xShape,
573  xContainingPage,
574  nPrio,
>>> CID 1596695:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "pGraphic" is passed-by-value as parameter to 
>>> "slideshow::internal::DrawShape::DrawShape(com::sun::star::uno::Reference
>>>  const &, 
>>> com::sun::star::uno::Reference, double, 
>>> std::shared_ptr, slideshow::internal::SlideShowContext const &)" 
>>> when it could be moved instead.
575  pGraphic,
576  rContext) );
577 
578 if( pShape->hasIntrinsicAnimation() )
579 {
580 OSL_ASSERT( !pShape->maAnimationFrames.empty() );

** CID 1596694:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/slideshow/source/engine/shapes/shapeimporter.cxx: 323 in 
slideshow::internal::ShapeImporter::createShape(const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, 
std::basic_string_view>) const()



New Defects reported by Coverity Scan for LibreOffice

2024-04-20 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
2 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 1 of 1 defect(s)


** CID 1596522:  Incorrect expression  (BAD_COMPARE)
/sc/source/core/data/patattr.cxx: 277 in 
CellAttributeHelper::RegisteredAttrSetLess::operator ()(const ScPatternAttr *, 
const rtl::OUString *) const()



*** CID 1596522:  Incorrect expression  (BAD_COMPARE)
/sc/source/core/data/patattr.cxx: 277 in 
CellAttributeHelper::RegisteredAttrSetLess::operator ()(const ScPatternAttr *, 
const rtl::OUString *) const()
271 {
272 int cmp = CompareStringPtr(lhs->GetStyleName(), rhs);
273 if (cmp < 0)
274 return true;
275 if (cmp > 0)
276 return false;
>>> CID 1596522:  Incorrect expression  (BAD_COMPARE)
>>> Comparing pointer "lhs" against "nullptr" using anything besides "==" 
>>> or "!=" is likely to be incorrect.
277 return lhs < static_cast(nullptr);
278 }
279 bool CellAttributeHelper::RegisteredAttrSetLess::operator()(const 
OUString* lhs, const ScPatternAttr* rhs) const
280 {
281 int cmp = CompareStringPtr(lhs, rhs->GetStyleName());
282 if (cmp < 0)



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DeGZ__A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGttWS9tzE37PgPm14eQfk0pIjwfvRDg36IZCRx64cuEDsMuGufFgqOb51JTYSfID2AwF4afWdfOnsTqD1Cn9HVR-2F5wuroye1vsAXxP3gUJncwnI2UR3msknLR-2B3-2FXAamwpcDulJwbR-2BRFuFc8gwzpNH1C3fVJFU9J9XjTpIQE9YYo-3D



New Defects reported by Coverity Scan for LibreOffice

2024-04-18 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1596521:  Resource leaks  (RESOURCE_LEAK)
/svgio/source/svgreader/svgfecompositenode.cxx: 248 in 
svgio::svgreader::SvgFeCompositeNode::apply(drawinglayer::primitive2d::Primitive2DContainer
 &, const svgio::svgreader::SvgFilterNode *) const()



*** CID 1596521:  Resource leaks  (RESOURCE_LEAK)
/svgio/source/svgreader/svgfecompositenode.cxx: 248 in 
svgio::svgreader::SvgFeCompositeNode::apply(drawinglayer::primitive2d::Primitive2DContainer
 &, const svgio::svgreader::SvgFilterNode *) const()
242 
243 const drawinglayer::primitive2d::Primitive2DReference xRef(
244 new drawinglayer::primitive2d::BitmapPrimitive2D(
245 aResBmpEx, 
basegfx::utils::createScaleTranslateB2DHomMatrix(
246aBaseRect.getRange(), 
aBaseRect.getMinimum(;
247 rTarget = drawinglayer::primitive2d::Primitive2DContainer{ xRef 
};
>>> CID 1596521:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pArithmeticFilter" going out of scope leaks the storage it 
>>> points to.
248 }
249 }
250 
251 } // end of namespace svgio::svgreader
252 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3Db3rj_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtnt62i6mFx1se7aN-2BqGSee1UnrR0hvz9xPkxZd86Rb5n1nZARgWme1ZB-2FD-2BLkK20PAHKxImk0ePnFitb15CErVfr-2Fp3c-2Bg1woU-2BQYdfp7xEixyBO-2Bw2mpV00XxohO0C8wyezsEYztlOFGNhW8uqzpHspCMYmltb87zXj26IQI81Y-3D



New Defects reported by Coverity Scan for LibreOffice

2024-04-13 Thread scan-admin
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.
2 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 2 of 2 defect(s)


** CID 1596323:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1596323:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/core/text/widorp.cxx: 482 in 
WidowsAndOrphans::FindWidows(SwTextFrame *, SwTextMargin &)()
476 if( bKeep && pFrame->IsInSct() && (
477 rAttr.GetKeepType() == 
css::text::ParagraphHyphenationKeepType::SPREAD ||
478 rAttr.GetKeepType() == 
css::text::ParagraphHyphenationKeepType::PAGE ) )
479 {
480 const SwSectionFrame* const pSct = pFrame->FindSctFrame();
481 // multi-column section
>>> CID 1596323:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 
>>> "pFrame->FindColFrame()" when calling "GetNext".
482 if ( pSct->Lower()->IsColumnFrame() && 
pSct->Lower()->GetNext()
483  // and not in the last column
484  && !pFrame->FindColFrame()->GetNext() )
485 {
486 bKeep = false;
487 }

** CID 1596322:  Resource leaks  (RESOURCE_LEAK)
/svgio/source/svgreader/svgfeblendnode.cxx: 158 in 
svgio::svgreader::SvgFeBlendNode::apply(drawinglayer::primitive2d::Primitive2DContainer
 &, const svgio::svgreader::SvgFilterNode *) const()



*** CID 1596322:  Resource leaks  (RESOURCE_LEAK)
/svgio/source/svgreader/svgfeblendnode.cxx: 158 in 
svgio::svgreader::SvgFeBlendNode::apply(drawinglayer::primitive2d::Primitive2DContainer
 &, const svgio::svgreader::SvgFilterNode *) const()
152 
153 const drawinglayer::primitive2d::Primitive2DReference xRef(
154 new drawinglayer::primitive2d::BitmapPrimitive2D(
155 aResBmpEx, 
basegfx::utils::createScaleTranslateB2DHomMatrix(
156aBaseRect.getRange(), 
aBaseRect.getMinimum(;
157 rTarget = drawinglayer::primitive2d::Primitive2DContainer{ xRef 
};
>>> CID 1596322:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pScreenBlendFilter" going out of scope leaks the storage it 
>>> points to.
158 }
159 
160 pParent->addGraphicSourceToMapper(maResult, rTarget);
161 }
162 
163 } // end of namespace svgio::svgreader
164 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3Dsnv6_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtuw314jrPBVWaQyrmAPGzU9vOtqtRrAdjw-2B4Z3l-2FSG3YnSY-2FhLDqo1J6WFHB9nVcdNzKwHNFSf-2BmzFHCVwLOh9kkBXRnPUFoHB7odZCx4jG9nXO-2B1xDw5jLnfdhNJ-2BKC8ZYR1i8jWUXdSOWyfzNnvptzS5PX-2BItrQHYQ1TtuSOAk-3D



New Defects reported by Coverity Scan for LibreOffice

2024-04-08 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
15 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 1 of 1 defect(s)


** CID 1596278:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1596278:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/text/frmform.cxx: 1205 in 
SwTextFrame::FormatAdjust(SwTextFormatter &, WidowsAndOrphans &, 
o3tl::strong_int, bool)()
1199 nNew = 0;
1200 }
1201 else if (!bEmptyWithSplitFly)
1202 {
1203 // Do not split immediately in the beginning of page 
(unless there is an at-para or
1204 // at-char or at-page fly, which pushes the rest down)
>>> CID 1596278:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pBodyFrame" to "hasAtPageFly", which dereferences 
>>> it.
1205 if (isFirstVisibleFrameInBody(this) && !hasFly(this) && 
!hasAtPageFly(pBodyFrame))
1206 nNew = 0;
1207 }
1208 }
1209 
1210 if ( nNew )



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DOVq3_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtlPTtwlLm0LVNz3b0CKB7cFDFIk0k2thRDBo3nZcFupaXqV493hgw-2Fl3onk-2FssT3N05Vk0hTGK1WN0aWq7a0zbfChKTMPg-2F20R8sbH8UhQ2yNsd-2BisYfJG4M66fXujPTZET58sbQSW5rWAtEOA-2FghnAs5P-2FQWwJSwNw9iubDqwmk-3D



New Defects reported by Coverity Scan for LibreOffice

2024-04-07 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

17 new defect(s) introduced to LibreOffice found with Coverity Scan.
5 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 17 of 17 defect(s)


** CID 1596254:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/dochdl/swdtflvr.cxx: 2815 in SwTransferable::PasteGrf(const 
TransferableDataHelper &, SwWrtShell &, SotClipboardFormatId, SwPasteSdr, const 
Point *, SotExchangeActionFlags, signed char, bool, RndStdIds)()



*** CID 1596254:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/dochdl/swdtflvr.cxx: 2815 in SwTransferable::PasteGrf(const 
TransferableDataHelper &, SwWrtShell &, SotClipboardFormatId, SwPasteSdr, const 
Point *, SotExchangeActionFlags, signed char, bool, RndStdIds)()
2809 case SotClipboardFormatId::SVXB:
2810 {
2811 std::unique_ptr xStm;
2812 
2813 if(rData.GetSotStorageStream(SotClipboardFormatId::SVXB, xStm))
2814 {
>>> CID 1596254:  Null pointer dereferences  (FORWARD_NULL)
>>> Attempting to access the managed object of an empty smart pointer 
>>> "xStm".
2815 TypeSerializer aSerializer(*xStm);
2816 aSerializer.readGraphic(aGraphic);
2817 bRet = (GraphicType::NONE != aGraphic.GetType() && 
GraphicType::Default != aGraphic.GetType());
2818 }
2819 
2820 break;

** CID 1596253:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/viewfun3.cxx: 785 in 
ScViewFunc::PasteOnDrawObjectLinked(const 
com::sun::star::uno::Reference &, 
SdrObject &)()



*** CID 1596253:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/viewfun3.cxx: 785 in 
ScViewFunc::PasteOnDrawObjectLinked(const 
com::sun::star::uno::Reference &, 
SdrObject &)()
779 std::unique_ptr xStm;
780 ScDrawView* pScDrawView = GetScDrawView();
781 
782 if( pScDrawView && aDataHelper.GetSotStorageStream( 
SotClipboardFormatId::SVXB, xStm ) )
783 {
784 Graphic aGraphic;
>>> CID 1596253:  Null pointer dereferences  (FORWARD_NULL)
>>> Attempting to access the managed object of an empty smart pointer 
>>> "xStm".
785 TypeSerializer aSerializer(*xStm);
786 aSerializer.readGraphic(aGraphic);
787 
788 const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
789 
790 if(pScDrawView->ApplyGraphicToObject( rHitObj, aGraphic, 
aBeginUndo, "" ))

** CID 1596252:(FORWARD_NULL)
/sc/source/ui/view/viewfun5.cxx: 256 in 
ScViewFunc::PasteDataFormat(SotClipboardFormatId, const 
com::sun::star::uno::Reference &, 
short, int, const Point *, bool, bool)()
/sc/source/ui/view/viewfun5.cxx: 238 in 
ScViewFunc::PasteDataFormat(SotClipboardFormatId, const 
com::sun::star::uno::Reference &, 
short, int, const Point *, bool, bool)()



*** CID 1596252:(FORWARD_NULL)
/sc/source/ui/view/viewfun5.cxx: 256 in 
ScViewFunc::PasteDataFormat(SotClipboardFormatId, const 
com::sun::star::uno::Reference &, 
short, int, const Point *, bool, bool)()
250 ScDocShellRef aDragShellRef( new ScDocShell );
251 aDragShellRef->MakeDrawLayer();
252 aDragShellRef->DoInitNew();
253 
254 ScDrawLayer* pModel = 
aDragShellRef->GetDocument().GetDrawLayer();
255 
>>> CID 1596252:(FORWARD_NULL)
>>> Attempting to access the managed object of an empty smart pointer 
>>> "xStm".
256 xStm->Seek(0);
257 
258 css::uno::Reference< css::io::XInputStream > xInputStream( 
new utl::OInputStreamWrapper( *xStm ) );
259 SvxDrawingLayerImport( pModel, xInputStream );
260 
261 // set everything to right layer:
/sc/source/ui/view/viewfun5.cxx: 238 in 
ScViewFunc::PasteDataFormat(SotClipboardFormatId, const 
com::sun::star::uno::Reference &, 
short, int, const Point *, bool, bool)()
232 else if (nFormatId == SotClipboardFormatId::SVXB)
233 {
234 std::unique_ptr xStm;
235 if( aDataHelper.GetSotStorageStream( 
SotClipboardFormatId::SVXB, xStm ) )
236 {
237 Graphic aGraphic;
>>> CID 1596252:(FORWARD_NULL)
>>> Attempting to access the managed object of an empty smart pointer 
>>> "xStm".
238 TypeSerializer aSerializer(*xStm);
239 aSerializer.readGraphic(aGraphic);
240 bRet = PasteGraphic( a

New Defects reported by Coverity Scan for LibreOffice

2024-04-04 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

17 new defect(s) introduced to LibreOffice found with Coverity Scan.
7 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 17 of 17 defect(s)


** CID 1596132:  API usage errors  (LOCK)



*** CID 1596132:  API usage errors  (LOCK)
/scripting/source/vbaevents/eventhelper.cxx: 529 in 
::EventListener::~EventListener()()
523 
524 #define EVENTLSTNR_PROPERTY_ID_MODEL 1
525 constexpr OUStringLiteral EVENTLSTNR_PROPERTY_MODEL = u"Model";
526 
527 namespace {
528 
>>> CID 1596132:  API usage errors  (LOCK)
>>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state.
529 class EventListener : public EventListener_BASE
530 ,public ::comphelper::OPropertyContainer2
531 ,public ::comphelper::OPropertyArrayUsageHelper< EventListener >
532 {
533 
534 public:

** CID 1596131:  API usage errors  (LOCK)



*** CID 1596131:  API usage errors  (LOCK)
/sc/source/ui/unoobj/celllistsource.cxx: 74 in 
calc::OCellListSource::~OCellListSource()()
68 {
69 if ( !m_bDisposed )
70 {
71 acquire();  // prevent duplicate dtor
72 dispose();
73 }
>>> CID 1596131:  API usage errors  (LOCK)
>>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state.
74 }
75 
76 IMPLEMENT_FORWARD_XINTERFACE2( OCellListSource, 
OCellListSource_Base, OCellListSource_PBase )
77 
78 IMPLEMENT_FORWARD_XTYPEPROVIDER2( OCellListSource, 
OCellListSource_Base, OCellListSource_PBase )
79 

** CID 1596130:  API usage errors  (LOCK)



*** CID 1596130:  API usage errors  (LOCK)
/chart2/source/tools/CachedDataSequence.cxx: 98 in 
chart::CachedDataSequence::~CachedDataSequence()()
92 }
93 
94 registerProperties();
95 }
96 
97 CachedDataSequence::~CachedDataSequence()
>>> CID 1596130:  API usage errors  (LOCK)
>>> "~WeakComponentImplHelper" uses "this->m_aMutex" in an uninitialized 
>>> state.
98 {}
99 
100 void CachedDataSequence::registerProperties()
101 {
102 registerProperty( "NumberFormatKey",
103   PROP_NUMBERFORMAT_KEY,

** CID 1596129:  API usage errors  (LOCK)



*** CID 1596129:  API usage errors  (LOCK)
/scripting/source/basprov/basmethnode.cxx: 99 in 
basprov::BasicMethodNodeImpl::~BasicMethodNodeImpl()()
93 registerProperty( BASPROV_PROPERTY_EDITABLE, 
BASPROV_PROPERTY_ID_EDITABLE, BASPROV_DEFAULT_ATTRIBS(), &m_bEditable, 
cppu::UnoType::get() );
94 }
95 
96 
97 BasicMethodNodeImpl::~BasicMethodNodeImpl()
98 {
>>> CID 1596129:  API usage errors  (LOCK)
>>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state.
99 }
100 
101 
102 // XInterface
103 
104 

** CID 1596128:  API usage errors  (LOCK)



*** CID 1596128:  API usage errors  (LOCK)
/sc/source/ui/unoobj/pageuno.cxx: 28 in ScPageObj::ScPageObj(SdrPage *)()
22 #include 
23 #include 
24 
25 using namespace ::com::sun::star;
26 
27 ScPageObj::ScPageObj( SdrPage* pPage ) :
>>> CID 1596128:  API usage errors  (LOCK)
>>> "SvxDrawPage" initializes "this->m_aMutex" while it is already 
>>> initialized.
28 SvxDrawPage( pPage )
29 {
30 }
31 
32 ScPageObj::~ScPageObj() noexcept
33 {

** CID 1596127:  API usage errors  (LOCK)



*** CID 1596127:  API usage errors  (LOCK)
/sccomp/source/solver/SolverComponent.cxx: 111 in 
SolverComponent::~SolverComponent()()
105 registerProperty( STR_EPSILONLEVEL, PROP_EPSILONLEVEL, 0, 
&mnEpsilonLevel, cppu::UnoType::get() );
106 registerProperty( STR_LIMITBBDEPTH, PROP_LIMITBBDEPTH, 0, 
&mbLimitBBDepth, cppu::UnoType::get() );
107 }
108 
109 SolverComponent::~SolverComponent()
110 {
>>> CID 1596127:  API usage errors  (LOCK)
>>> "~WeakImplHelper" uses "this->m_aMutex" in an uninitialized state.
111 }
112 
113 IMPLEMENT_FORWARD_XINTERFACE2( SolverComponent, SolverComponent_Base, 
comphelper::OPropertyContainer2 )
114 IMPLEMENT_FORWARD_XTYP

New Defects reported by Coverity Scan for LibreOffice

2024-03-24 Thread scan-admin
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.
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 2 of 2 defect(s)


** CID 1594675:(DEADCODE)
/sc/source/ui/view/tabview.cxx: 1160 in ScTabView::ScrollHdl(ScrollAdaptor *)()
/sc/source/ui/view/tabview.cxx: 1158 in ScTabView::ScrollHdl(ScrollAdaptor *)()



*** CID 1594675:(DEADCODE)
/sc/source/ui/view/tabview.cxx: 1160 in ScTabView::ScrollHdl(ScrollAdaptor *)()
1154 aHelpStr = ScResId(STR_ROW) +
1155" " + OUString::number(nScrollPos + 1);
1156 
1157 // show quicktext always inside sheet area
1158 aRect.SetLeft( bLayoutRTL ? (aPos.X() + aSize.Width() 
+ 8) : (aPos.X() - 8) );
1159 aRect.SetTop( aMousePos.Y() );
>>> CID 1594675:(DEADCODE)
>>> Execution cannot reach the expression "QuickHelpFlags::Left" inside 
>>> this statement: " = (bLayoutRTL ?...".
1160 nAlign   = (bLayoutRTL ? QuickHelpFlags::Left : 
QuickHelpFlags::Right) | QuickHelpFlags::VCenter;
1161 }
1162 aRect.SetRight( aRect.Left() );
1163 aRect.SetBottom( aRect.Top() );
1164 
1165 Help::ShowQuickHelp(pScroll->GetParent(), aRect, aHelpStr, 
nAlign);
/sc/source/ui/view/tabview.cxx: 1158 in ScTabView::ScrollHdl(ScrollAdaptor *)()
1152 else
1153 {
1154 aHelpStr = ScResId(STR_ROW) +
1155" " + OUString::number(nScrollPos + 1);
1156 
1157 // show quicktext always inside sheet area
>>> CID 1594675:(DEADCODE)
>>> Execution cannot reach the expression "aPos.X() + aSize.Width() + 8L" 
>>> inside this statement: "aRect.SetLeft((bLayoutRTL ?...".
1158 aRect.SetLeft( bLayoutRTL ? (aPos.X() + aSize.Width() 
+ 8) : (aPos.X() - 8) );
1159 aRect.SetTop( aMousePos.Y() );
1160 nAlign   = (bLayoutRTL ? QuickHelpFlags::Left : 
QuickHelpFlags::Right) | QuickHelpFlags::VCenter;
1161 }
1162 aRect.SetRight( aRect.Left() );
1163 aRect.SetBottom( aRect.Top() );

** CID 1594674:  API usage errors  (INVALIDATE_ITERATOR)
/sc/source/core/data/SolverSettings.cxx: 789 in 
sc::SolverSettings::TabHasSolverModel()()



*** CID 1594674:  API usage errors  (INVALIDATE_ITERATOR)
/sc/source/core/data/SolverSettings.cxx: 789 in 
sc::SolverSettings::TabHasSolverModel()()
783so before it is called, no solver-related named ranges exist.
784 */
785 bool SolverSettings::TabHasSolverModel()
786 {
787 // Check if the named range for the objective value exists in the 
sheet
788 const auto iter = m_mNamedRanges.find(SP_OBJ_CELL);
>>> CID 1594674:  API usage errors  (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "iter" though it is already past the end of its 
>>> container.
789 OUString sRange = iter->second;
790 ScRangeData* pRangeData
791 = 
m_pRangeName->findByUpperName(ScGlobal::getCharClass().uppercase(sRange));
792 if (pRangeData)
793 return true;
794 return false;
795 }
796 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DBAIx_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtERQty1Y5JpkDXubi7MsokQaRv4jsHtrS-2BixY5vNs-2FGbRZsRBY0-2Ba4Ds142E1HxrBQy3-2FfJLFeOubpB02YnnKddIcygoNaLijEdfdc1WG4Y32XWZ2k46a8UyxKtYrRJWZowog86JcdLAHzoDzhbfpYGyqwawJaDre8AYwyGfd4rM-3D



New Defects reported by Coverity Scan for LibreOffice

2024-03-17 Thread scan-admin
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 1594402:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1594402:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/unoobj/docuno.cxx: 2372 in lcl_SetMediaScreen(const 
com::sun::star::uno::Reference &, const 
OutputDevice *, tools::Rectangle &, int)()
2366: OUString::Concat(sTitle) + 
OUString::Concat("\n")
2367  + 
OUString::Concat(sDescription));
2368 
2369 OUString const 
mimeType(xPropSet->getPropertyValue("MediaMimeType").get());
2370 SdrObject* 
pSdrObj(SdrObject::getSdrObjectFromXShape(xMediaShape));
2371 vcl::PDFExtOutDevData* pPDF = 
dynamic_cast(pDev->GetExtOutDevData());
>>> CID 1594402:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pPDF" to "CreateScreen", which dereferences it.
2372 sal_Int32 nScreenId = pPDF->CreateScreen(aRect, altText, 
mimeType, nPageNumb, pSdrObj);
2373 if (sMediaURL.startsWith("vnd.sun.star.Package:"))
2374 {
2375 // Embedded media
2376 OUString aTempFileURL;
2377 xPropSet->getPropertyValue("PrivateTempFileURL") >>= 
aTempFileURL;

** CID 1594401:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1594401:  Null pointer dereferences  (FORWARD_NULL)
/sfx2/source/sidebar/ControllerItem.cxx: 72 in 
sfx2::sidebar::ControllerItem::RequestUpdate()()
66 const SfxItemState eState (GetBindings().QueryState(GetId(), 
pState));
67 if (GetId() == SID_ATTR_METRIC && 
comphelper::LibreOfficeKit::isActive())
68 {
69 MeasurementSystem eSystem
70 = 
LocaleDataWrapper(comphelper::LibreOfficeKit::getLocale()).getMeasurementSystemEnum();
71 FieldUnit eUnit = MeasurementSystem::Metric == eSystem ? 
FieldUnit::CM : FieldUnit::INCH;
>>> CID 1594401:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pState.get()" to "SetValue", which dereferences 
>>> it.
72 
static_cast(pState.get())->SetValue(static_cast(eUnit));
73 }
74 mrItemUpdateReceiver.NotifyItemUpdate(GetId(), eState, pState.get());
75 }
76 
77 
ControllerItem::ItemUpdateReceiverInterface::~ItemUpdateReceiverInterface()



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DQmg-_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtuM6dpEYHAKPAFOJnFFVTAqyXcfeEbV-2BOW4lbsmS1OR0nkjjh7njRe7s5QFDFx7brLxb5QyVkD5FJ6Cbd7-2Bgo8L3HkTQubHucgEUCgCYMVFNZbqXF2c2vU7innBMhSfrv9VCmBEXIFp5fBqc-2B4Gq1xnoJqgsa0QHSbGHvJGqgj30NSky9ULHy9BfyemEoKG3F



New Defects reported by Coverity Scan for LibreOffice

2024-03-07 Thread scan-admin
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.
4 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 1592991:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController_Properties.cxx: 796 in 
chart::ChartController::executeDlg_ObjectProperties_withUndoGuard(std::shared_ptr,
 const rtl::OUString &, bool)()



*** CID 1592991:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController_Properties.cxx: 796 in 
chart::ChartController::executeDlg_ObjectProperties_withUndoGuard(std::shared_ptr,
 const rtl::OUString &, bool)()
790 {
791 aDlgPtr->SetAxisMinorStepWidthForErrorBarDecimals(
792 
InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( xChartDoc, 
m_xChartView, rObjectCID ) );
793 }
794 
795 //open the dialog
>>> CID 1592991:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aUndoGuard" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
796 SfxTabDialogController::runAsync(aDlgPtr, [aDlgPtr, xChartDoc, 
pItemConverter, bSuccessOnUnchanged, aUndoGuard] (int nResult)
797 {
798 if (nResult == RET_OK || (bSuccessOnUnchanged && 
aDlgPtr->DialogWasClosedWithOK())) {
799 const SfxItemSet* pOutItemSet = 
aDlgPtr->GetOutputItemSet();
800 if(pOutItemSet) {
801 ControllerLockGuardUNO aCLGuard(xChartDoc);

** CID 1592990:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController_Properties.cxx: 712 in 
chart::ChartController::executeDlg_ObjectProperties(const rtl::OUString &)()



*** CID 1592990:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController_Properties.cxx: 712 in 
chart::ChartController::executeDlg_ObjectProperties(const rtl::OUString &)()
706 auto aUndoGuard = std::make_shared(
707 ActionDescriptionProvider::createDescription(
708 ActionDescriptionProvider::ActionType::Format,
709 ObjectNameProvider::getName( 
ObjectIdentifier::getObjectType( aObjectCID ))),
710 m_xUndoManager );
711 
>>> CID 1592990:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aUndoGuard" is passed-by-value as parameter to 
>>> "executeDlg_ObjectProperties_withUndoGuard" when it could be moved instead.
712 ChartController::executeDlg_ObjectProperties_withUndoGuard( 
aUndoGuard, aObjectCID, false );
713 }
714 
715 void ChartController::executeDlg_ObjectProperties_withUndoGuard(
716 std::shared_ptr aUndoGuard,const OUString& rObjectCID, 
bool bSuccessOnUnchanged )
717 {

** CID 1592989:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/window/brdwin.cxx: 2014 in ImplBorderWindow::FlashWindow() const()



*** CID 1592989:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/window/brdwin.cxx: 2014 in ImplBorderWindow::FlashWindow() const()
2008 vcl::Window* pMyParent = mpWindowImpl->mpParent;
2009 while (pMyParent && pMyParent->mpWindowImpl && 
pMyParent->mpWindowImpl->mpParent)
2010 {
2011 pMyParent = pMyParent->mpWindowImpl->mpParent;
2012 }
2013 if (pMyParent) {
>>> CID 1592989:  Null pointer dereferences  (FORWARD_NULL)
>>> Attempting to access the managed object of an empty smart pointer 
>>> "pMyParent->mpWindowImpl".
2014 pMyParent->mpWindowImpl->mpFrame->FlashWindow();
2015 }
2016 }
2017 

** CID 1592988:  Uninitialized members  (UNINIT_CTOR)
/sw/source/core/text/porlay.cxx: 852 in SwLineLayout::SwLineLayout()()



*** CID 1592988:  Uninitialized members  (UNINIT_CTOR)
/sw/source/core/text/porlay.cxx: 852 in SwLineLayout::SwLineLayout()()
846   m_nRealHeight( 0 ),
847   m_nTextHeight( 0 ),
848   m_bUnderscore( false )
849 {
850 ResetFlags();
851 SetWhichPor( PortionType::Lay );
>>> CID 1592988:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_bLastHyph" is not initialized in this 
>>> constructor nor in any functions that it calls.
852 }
853 
854 SwLinePortion *SwLi

New Defects reported by Coverity Scan for LibreOffice

2024-03-02 Thread scan-admin
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.
2 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 1592910:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1592910:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/core/edit/edsect.cxx: 349 in lcl_SpecialInsertNode(const SwPosition 
*)()
343 //   only protection outside needs to be checked
344 if( pSection &&
345 (SectionType::ToxHeader == pSection->GetType() ||
346  SectionType::ToxContent == pSection->GetType()))
347 {
348 if (SectionType::ToxHeader == pSection->GetType())
>>> CID 1592910:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pSection->GetParent()" 
>>> when calling "GetFormat".
349 pInnermostNode = 
pSection->GetParent()->GetFormat()->GetSectionNode();
350 bIsProtected = static_cast(pInnermostNode)->IsInProtectSect();
351 }
352 
353 // The previous version had a check to skip empty read-only 
sections. Those
354 // shouldn't occur, so we only need to check whether our 
pInnermostNode is

** CID 1592909:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/edit/edsect.cxx: 337 in lcl_SpecialInsertNode(const SwPosition 
*)()



*** CID 1592909:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/edit/edsect.cxx: 337 in lcl_SpecialInsertNode(const SwPosition 
*)()
331 }
332 else
333 pInnermostNode = pTableNode;
334 }
335 }
336 bool bIsProtected = pInnermostNode->IsProtect();
>>> CID 1592909:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pInnermostNode" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
337 if(pInnermostNode != nullptr)
338 {
339 //special case - ToxSection
340 // - in this case the inner section could be tox header
341 //   section but the new node should be before the content 
section
342 //   protection of the tox should not prevent the insertion

** CID 1592908:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1592908:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/core/edit/edsect.cxx: 336 in lcl_SpecialInsertNode(const SwPosition 
*)()
330 pSection = &static_cast(pSectionNode)->GetSection();
331 }
332 else
333 pInnermostNode = pTableNode;
334 }
335 }
>>> CID 1592908:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pInnermostNode" when 
>>> calling "IsProtect".
336 bool bIsProtected = pInnermostNode->IsProtect();
337 if(pInnermostNode != nullptr)
338 {
339 //special case - ToxSection
340 // - in this case the inner section could be tox header
341 //   section but the new node should be before the content 
section



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DoByu_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtQnnP2Sl-2BcQ8L7jLCiUvR0e20beDprWglfuXB9hxvFXmlxGvnqQ6tKW7XlK3i8VGudPmeOrrs0Wv9ppjT9Kvmk0vnqDB7iIZaTN8mBl-2BIFQpqyiv4ZzeA3By8mGuMOg99GWdNOmQeHQ3EaGZtYA33KPc43G0l-2Beciq31oEU-2BnMJk-3D



New Defects reported by Coverity Scan for LibreOffice

2024-02-28 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
7 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 1 of 1 defect(s)


** CID 1592640:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/slideshow/slideshowimpl.cxx: 1130 in 
sd::SlideshowImpl::startShow(const sd::PresentationSettingsEx *)()



*** CID 1592640:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/slideshow/slideshowimpl.cxx: 1130 in 
sd::SlideshowImpl::startShow(const sd::PresentationSettingsEx *)()
1124 mpViewShell->GetViewShellBase().ShowUIControls (false);
1125 // Hide the side panes for in-place presentations.
1126 if ( ! maPresSettings.mbFullScreen)
1127 mpPaneHider.reset(new PaneHider(*mpViewShell,this));
1128 
1129 // these Slots are forbidden in other views for this 
document
>>> CID 1592640:  Null pointer dereferences  (FORWARD_NULL)
>>> Dereferencing null pointer "pPresSettings".
1130 if( mpDocSh && !pPresSettings->mbInteractive) // IASS
1131 {
1132 mpDocSh->SetSlotFilter( true, pAllowed );
1133 mpDocSh->ApplySlotFilter();
1134 }
1135 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DnEde_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGt1tr1i9DQoO7ElOGukyr4SHjOVDWMXgVx3dXiRAReu0G9KraVCIeQhsM5zgCnrFYy0Wr-2FLkgjbxGfTbsLjC3oXwYUNsxmwGHNMquG1C6mBOHOn3YbKHUkDtmsq7OWI00mIxMmshRz231IywiZJZ-2Fm1CMA5c-2BL-2Fyn7X1diIY2DxbI-3D



New Defects reported by Coverity Scan for LibreOffice

2024-02-26 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

7 new defect(s) introduced to LibreOffice found with Coverity Scan.
3 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 7 of 7 defect(s)


** CID 1592381:(OVERRUN)
/oox/source/drawingml/scene3dhelper.cxx: 248 in 
oox::Scene3DHelper::getAPIAnglesFrom3DProperties(std::shared_ptr,
 const int &, double &, double &, double &)()
/oox/source/drawingml/scene3dhelper.cxx: 250 in 
oox::Scene3DHelper::getAPIAnglesFrom3DProperties(std::shared_ptr,
 const int &, double &, double &, double &)()
/oox/source/drawingml/scene3dhelper.cxx: 249 in 
oox::Scene3DHelper::getAPIAnglesFrom3DProperties(std::shared_ptr,
 const int &, double &, double &, double &)()



*** CID 1592381:(OVERRUN)
/oox/source/drawingml/scene3dhelper.cxx: 248 in 
oox::Scene3DHelper::getAPIAnglesFrom3DProperties(std::shared_ptr,
 const int &, double &, double &, double &)()
242 // OOXML markup are given, they overwrite the values from the 
preset camera type. Otherwise the
243 // values from the preset camera are used. OOXML requires that all 
three attributes must exist at
244 // the same time. Thus it is enough to test one of them.
245 if (!(*p3DProperties).maCameraRotation.mnRevolution.has_value())
246 {
247 // The angles are given in 1/6 deg in 
aPrstCameraValuesArray.
>>> CID 1592381:(OVERRUN)
>>> Overrunning array "oox::aPrstCameraValuesArray" of 62 104-byte elements 
>>> at element index 62 (byte offset 6551) using index 
>>> "this->mnPrstCameraIndex" (which evaluates to 62).
248 nLatitude = 
aPrstCameraValuesArray[mnPrstCameraIndex].mfRotateAngleX;
249 nLongitude = 
aPrstCameraValuesArray[mnPrstCameraIndex].mfRotateAngleY;
250 nRevolution = 
aPrstCameraValuesArray[mnPrstCameraIndex].mfRotateAngleZ;
251 }
252 
253 // MS Office applies the shape rotation after the rotations from 
camera in case of non-legacy
/oox/source/drawingml/scene3dhelper.cxx: 250 in 
oox::Scene3DHelper::getAPIAnglesFrom3DProperties(std::shared_ptr,
 const int &, double &, double &, double &)()
244 // the same time. Thus it is enough to test one of them.
245 if (!(*p3DProperties).maCameraRotation.mnRevolution.has_value())
246 {
247 // The angles are given in 1/6 deg in 
aPrstCameraValuesArray.
248 nLatitude = 
aPrstCameraValuesArray[mnPrstCameraIndex].mfRotateAngleX;
249 nLongitude = 
aPrstCameraValuesArray[mnPrstCameraIndex].mfRotateAngleY;
>>> CID 1592381:(OVERRUN)
>>> Overrunning array "oox::aPrstCameraValuesArray" of 62 104-byte elements 
>>> at element index 62 (byte offset 6551) using index 
>>> "this->mnPrstCameraIndex" (which evaluates to 62).
250 nRevolution = 
aPrstCameraValuesArray[mnPrstCameraIndex].mfRotateAngleZ;
251 }
252 
253 // MS Office applies the shape rotation after the rotations from 
camera in case of non-legacy
254 // cameras, and before for legacy cameras. ODF specifies to first 
rotate the shape. Thus we need
255 // to add shape rotation to nRevolution in case of non-legacy 
cameras. The shape rotation has
/oox/source/drawingml/scene3dhelper.cxx: 249 in 
oox::Scene3DHelper::getAPIAnglesFrom3DProperties(std::shared_ptr,
 const int &, double &, double &, double &)()
243 // values from the preset camera are used. OOXML requires that all 
three attributes must exist at
244 // the same time. Thus it is enough to test one of them.
245 if (!(*p3DProperties).maCameraRotation.mnRevolution.has_value())
246 {
247 // The angles are given in 1/6 deg in 
aPrstCameraValuesArray.
248 nLatitude = 
aPrstCameraValuesArray[mnPrstCameraIndex].mfRotateAngleX;
>>> CID 1592381:(OVERRUN)
>>> Overrunning array "oox::aPrstCameraValuesArray" of 62 104-byte elements 
>>> at element index 62 (byte offset 6551) using index 
>>> "this->mnPrstCameraIndex" (which evaluates to 62).
249 nLongitude = 
aPrstCameraValuesArray[mnPrstCameraIndex].mfRotateAngleY;
250 nRevolution = 
aPrstCameraValuesArray[mnPrstCameraIndex].mfRotateAngleZ;
251 }
252 
253 // MS Office applies the shape rotation after the rotations from 
camera in case of non-legacy
254 // cameras, and before for legacy cameras. ODF specifies to first 
rotate the shape. Thus we need

** CID 1592380:  Incorrect expression  (COPY_PASTE_ERROR)
/sd/source/ui/slideshow/slideshowimpl.cxx: 3439 in 
sd::SlideshowImpl::Notify(SfxBroadcaster &, const SfxHint &)()


___

New Defects reported by Coverity Scan for LibreOffice

2024-02-16 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 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 1 of 1 defect(s)


** CID 1592140:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx: 237 in 
drawinglayer::primitive2d::PatternFillPrimitive2D::create2DDecomposition(const 
drawinglayer::geometry::ViewInformation2D &) const()



*** CID 1592140:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx: 237 in 
drawinglayer::primitive2d::PatternFillPrimitive2D::create2DDecomposition(const 
drawinglayer::geometry::ViewInformation2D &) const()
231 
232 // create one primitive for each matrix
233 for(size_t a(0); a < aMatrices.size(); a++)
234 {
235 aRetval[a] = new TransformPrimitive2D(
236 aMatrices[a],
>>> CID 1592140:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aContent" is passed-by-value as parameter to 
>>> "drawinglayer::primitive2d::TransformPrimitive2D::TransformPrimitive2D(basegfx::B2DHomMatrix,
>>>  drawinglayer::primitive2d::Primitive2DContainer &&)" when it could be 
>>> moved instead.
237 Primitive2DContainer(aContent));
238 }
239 
240 // transform result which is in unit coordinates to mask's 
object coordinates
241 {
242 const basegfx::B2DHomMatrix aMaskTransform(



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3Dtz1R_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiZjg2Q2TJLdTnF-2B9XFDtNnn7ZwF3iYbeyhd4IuSBeG6GhFOROVKZeGU-2Bn2kqQJh9KOx-2Bg78lyJNUvgB8bzjaslJyPbolkCmGdsj6dNoJ92d2GYkFpA54lTi-2BlWlAhXyTPlLgSn12O-2FJyo5xLYnr2AgL-2FvdcOcJ90t21PpSHx9VYg-3D



New Defects reported by Coverity Scan for LibreOffice

2024-02-10 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 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 1 of 1 defect(s)


** CID 1591787:  API usage errors  (SWAPPED_ARGUMENTS)



*** CID 1591787:  API usage errors  (SWAPPED_ARGUMENTS)
/vcl/source/window/printdlg.cxx: 1036 in vcl::PrintDialog::updatePageSize(int)()
1030 
1031 if (nOrientation != ORIENTATION_AUTOMATIC)
1032 {
1033 if ((nOrientation == ORIENTATION_PORTRAIT && aSize.Width() > 
aSize.Height())
1034 || (nOrientation == ORIENTATION_LANDSCAPE && aSize.Width() 
< aSize.Height()))
1035 {
>>> CID 1591787:  API usage errors  (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the constructor for "Size" do not match 
>>> the ordering of the parameters:
* "aSize.Height()" is passed to "nWidth".
* "aSize.Width()" is passed to "nHeight".
1036 aSize = Size(aSize.Height(), aSize.Width());
1037 }
1038 }
1039 
1040 aPrt->SetPrintPageSize(aSize);
1041 aPrt->SetUsePrintDialogSetting(true);



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DDZ5s_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi-2FMQNah90sVdv0ufhkoWtzO2yEdxi5dY8o2vQQcoB2hSoFdNaLwNmMm2gNCNERoDYMS8RgLOYE-2BbbR5orvWVPZD-2BuXBdfvqECndMhQI28ykYcGID5mITnTdGzTD6Riqj0OEId5AFt9Df0-2BKx251CiECdMrJhLCwyirGDqU81cM1A-3D



New Defects reported by Coverity Scan for LibreOffice

2024-02-09 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

10 new defect(s) introduced to LibreOffice found with Coverity Scan.
8 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 10 of 10 defect(s)


** CID 1591769:(COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController_Insert.cxx: 611 in 
chart::ChartController::executeDispatch_InsertErrorBars(bool)()
/chart2/source/controller/main/ChartController_Insert.cxx: 572 in 
chart::ChartController::executeDispatch_InsertErrorBars(bool)()



*** CID 1591769:(COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController_Insert.cxx: 611 in 
chart::ChartController::executeDispatch_InsertErrorBars(bool)()
605 getChartModel(),
606 bYError ? ErrorBarResources::ERROR_BAR_Y : 
ErrorBarResources::ERROR_BAR_X);
607 
608 aDlg->SetAxisMinorStepWidthForErrorBarDecimals(
609 
InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( 
getChartModel(), m_xChartView, u"" ) );
610 
>>> CID 1591769:(COPY_INSTEAD_OF_MOVE)
>>> "aUndoGuard" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
611 weld::DialogController::runAsync(aDlg, [this, aDlg, 
aItemConverter, aUndoGuard](int nResult) {
612 if ( nResult == RET_OK )
613 {
614 SfxItemSet aOutItemSet = 
aItemConverter->CreateEmptyItemSet();
615 aDlg->FillItemSet( aOutItemSet );
616 
/chart2/source/controller/main/ChartController_Insert.cxx: 572 in 
chart::ChartController::executeDispatch_InsertErrorBars(bool)()
566 aDlg->SetAxisMinorStepWidthForErrorBarDecimals(
567 
InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( 
getChartModel(),
568 
 m_xChartView, m_aSelection.getSelectedCID()));
569 
570 // note: when a user pressed "OK" but didn't change any 
settings in the
571 // dialog, the SfxTabDialog returns "Cancel"
>>> CID 1591769:(COPY_INSTEAD_OF_MOVE)
>>> "aUndoGuard" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved 
>>> instead.
572 SfxTabDialogController::runAsync(aDlg, [this, aDlg, 
aItemConverter, aUndoGuard](int nResult) {
573 if ( nResult == RET_OK || aDlg->DialogWasClosedWithOK() )
574 {
575 const SfxItemSet* pOutItemSet = 
aDlg->GetOutputItemSet();
576 if( pOutItemSet )
577 {

** CID 1591768:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController_Insert.cxx: 291 in 
chart::ChartController::executeDispatch_InsertTitles()()



*** CID 1591768:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController_Insert.cxx: 291 in 
chart::ChartController::executeDispatch_InsertTitles()()
285 {
286 auto aDialogInput = std::make_shared();
287 aDialogInput->readFromModel( getChartModel() );
288 
289 SolarMutexGuard aGuard;
290 auto aDlg = std::make_shared(GetChartFrame(), 
*aDialogInput);
>>> CID 1591768:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aUndoGuard" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
291 weld::DialogController::runAsync(aDlg, [this, aDlg, 
aDialogInput, aUndoGuard](int nResult){
292 if ( nResult == RET_OK )
293 {
294 // lock controllers till end of block
295 ControllerLockGuardUNO aCLGuard( getChartModel() );
296 TitleDialogData aDialogOutput( 
impl_createReferenceSizeProvider() );

** CID 1591767:(UNINIT_CTOR)
/sc/source/core/data/queryiter.cxx: 79 in 
ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)1, 
(ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, 
ScInterpreterContext &, short, const ScQueryParam &, bool, bool)()
/sc/source/core/data/queryiter.cxx: 79 in 
ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, 
(ScQueryCellIteratorType)1>::ScQueryCellIteratorBase(ScDocument &, 
ScInterpreterContext &, short, const ScQueryParam &, bool, bool)()
/sc/source/core/data/queryiter.cxx: 79 in 
ScQueryCellIteratorBase<(ScQueryCellIteratorAccess)0, 
(ScQueryCellIteratorType)0>::ScQueryCellIteratorBase(ScDocument &, 
ScInterpreterContext &, short, const ScQu

New Defects reported by Coverity Scan for LibreOffice

2024-02-07 Thread scan-admin
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.
17 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 2 of 2 defect(s)


** CID 1591747:  Control flow issues  (NO_EFFECT)
/vcl/source/gdi/TypeSerializer.cxx: 462 in TypeSerializer::readMapMode(MapMode 
&)()



*** CID 1591747:  Control flow issues  (NO_EFFECT)
/vcl/source/gdi/TypeSerializer.cxx: 462 in TypeSerializer::readMapMode(MapMode 
&)()
456 mrStream.ReadUInt16(nUnit);
457 readPoint(aOrigin);
458 readFraction(aScaleX);
459 readFraction(aScaleY);
460 mrStream.ReadCharAsBool(bSimple);
461 
>>> CID 1591747:  Control flow issues  (NO_EFFECT)
>>> This less-than-zero comparison of an unsigned value is never true. 
>>> "nUnit < 0".
462 if (nUnit < sal_Int16(MapUnit::Map100thMM) || nUnit > 
sal_Int16(MapUnit::LAST))
463 {
464 SAL_WARN("vcl.gdi", "Parsing error: invalid mapmode");
465 return false;
466 }
467 MapUnit eUnit = static_cast(nUnit);

** CID 1591746:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/vcl/source/gdi/TypeSerializer.cxx: 462 in TypeSerializer::readMapMode(MapMode 
&)()



*** CID 1591746:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/vcl/source/gdi/TypeSerializer.cxx: 462 in TypeSerializer::readMapMode(MapMode 
&)()
456 mrStream.ReadUInt16(nUnit);
457 readPoint(aOrigin);
458 readFraction(aScaleX);
459 readFraction(aScaleY);
460 mrStream.ReadCharAsBool(bSimple);
461 
>>> CID 1591746:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>> "nUnit < 0 /* (sal_Int16)MapUnit::Map100thMM */" is always false 
>>> regardless of the values of its operands. This occurs as the logical first 
>>> operand of "||".
462 if (nUnit < sal_Int16(MapUnit::Map100thMM) || nUnit > 
sal_Int16(MapUnit::LAST))
463 {
464 SAL_WARN("vcl.gdi", "Parsing error: invalid mapmode");
465 return false;
466 }
467 MapUnit eUnit = static_cast(nUnit);



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3Doo0P_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiKCkzfyxoeQcM5wzPHNpnNYhnHmuGI4YO-2F0xdfF3oWcgfgZvFMXwuWwfCIx8UMZO-2FdAC6eMLXLjm7BlypTHmZBivbagamiEGfFLi6PCP7GFfa5WThz1S5xy4ZmSGUU-2BjF-2FbaluI7tI-2BGbfL14bTYl2rqqtG4SlApvqwwD2UjYE2Y-3D



New Defects reported by Coverity Scan for LibreOffice

2024-02-02 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

16 new defect(s) introduced to LibreOffice found with Coverity Scan.
5 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 16 of 16 defect(s)


** CID 1591496:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1591496:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/core/layout/atrfrm.cxx: 2637 in SwFrameFormat::SetFormatName(const 
rtl::OUString &, bool)()
2631 if (!aHint.m_sOld.isEmpty() && aHint.m_sOld != aHint.m_sNew)
2632 {
2633 if (SwFlyFrame* pSFly = SwIterator(*this).First())
2634 {
2635 if (pSFly->Lower() && !pSFly->Lower()->IsNoTextFrame())
2636 {
>>> CID 1591496:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 
>>> "static_cast(pSFly->ContainsContent())" when calling 
>>> "GetTextNodeFirst".
2637 if (SwTextNode* pSwTxtNode = 
static_cast(pSFly->ContainsContent())->GetTextNodeFirst())
2638 
pSwTxtNode->resetAndQueueAccessibilityCheck(true);
2639 }
2640 else
2641 {
2642 if (SwNode* pSwNode = 
static_cast(pSFly->Lower())->GetNode())

** CID 1591495:  Resource leaks  (RESOURCE_LEAK)
/test/source/xmltesttools.cxx: 306 in XmlTestTools::assertXPathNodeName(const 
std::unique_ptr<_xmlDoc, xmlDocDeleter> &, const rtl::OString &, const 
rtl::OString &)()



*** CID 1591495:  Resource leaks  (RESOURCE_LEAK)
/test/source/xmltesttools.cxx: 306 in XmlTestTools::assertXPathNodeName(const 
std::unique_ptr<_xmlDoc, xmlDocDeleter> &, const rtl::OString &, const 
rtl::OString &)()
300 CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(OString::Concat("In <") + 
pXmlDoc->name + ">, XPath '" + rXPath + "' number of nodes is 
incorrect").getStr(),
301  1,
302  xmlXPathNodeSetGetLength(pXmlNodes));
303 xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
304 CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(OString::Concat("In XPath '" + 
rXPath + "' name of node is incorrect")).getStr(),
305  rExpectedName, 
oconvert(pXmlNode->name));
>>> CID 1591495:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pXmlObj" going out of scope leaks the storage it points to.
306 }
307 
308 void XmlTestTools::registerODFNamespaces(xmlXPathContextPtr& 
pXmlXpathCtx)
309 {
310 xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("manifest"),
311
BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"));

** CID 1591494:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1591494:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/core/layout/trvlfrm.cxx: 1533 in 
SwRootFrame::GetNextPrevContentPos(const Point &, bool) const()
1527 while ( !pCnt )
1528 {
1529 pPage = static_cast(pPage->GetPrev());
1530 if ( pPage )
1531 pCnt = pPage->ContainsContent();
1532 else
>>> CID 1591494:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 
>>> "this->ContainsContent()" when calling "UnionFrame".
1533 return ContainsContent()->UnionFrame().Pos();
1534 }
1535 pCnt->Calc(pRenderContext);
1536 }
1537 }
1538 

** CID 1591493:  Error handling issues  (CHECKED_RETURN)
/comphelper/source/xml/xmltools.cxx: 79 in comphelper::xml::makeXMLChaff()()



*** CID 1591493:  Error handling issues  (CHECKED_RETURN)
/comphelper/source/xml/xmltools.cxx: 79 in comphelper::xml::makeXMLChaff()()
73 {
74 OString makeXMLChaff()
75 {
76 rtlRandomPool pool = rtl_random_createPool();
77 
78 sal_Int8 n;
>>> CID 1591493:  Error handling issues  (CHECKED_RETURN)
>>> Calling "rtl_random_getBytes" without checking return value (as is done 
>>> elsewhere 13 out of 16 times).
79 rtl_random_getBytes(pool, &n, 1);
80 
81 sal_Int32 nLength = 1024+n;
82 // coverity[tainted_data] - 1024 deliberate random minus max 
-127/plus max 128
83 std::vec

New Defects reported by Coverity Scan for LibreOffice

2024-01-29 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
16 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 1 of 1 defect(s)


** CID 1591435:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svx/source/dialog/grfflt.cxx: 271 in handleGraphicFilterDialog(const 
VclPtr &, const Graphic &, const 
std::function &)::[lambda(int) (instance 
1)]::operator ()(int) const()



*** CID 1591435:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svx/source/dialog/grfflt.cxx: 271 in handleGraphicFilterDialog(const 
VclPtr &, const Graphic &, const 
std::function &)::[lambda(int) (instance 
1)]::operator ()(int) const()
265 pDlg->StartExecuteAsync(
266 [pDlg, aInputGraphic, f] (sal_Int32 nResult)->void
267 {
268 if (nResult == RET_OK)
269 {
270 Graphic aOutputGraphic = pDlg->GetFilteredGraphic( 
aInputGraphic, 1.0, 1.0 );
>>> CID 1591435:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aOutputGraphic" is passed-by-value as parameter to 
>>> "GraphicObject::GraphicObject(Graphic)" when it could be moved instead.
271 f(aOutputGraphic);
272 }
273 pDlg->disposeOnce();
274 }
275 );
276 }



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DI_zk_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJihCoBL4HhM-2FUQzSEmVtE14r0kO217z4CU3ew2QzXzxbjrbykpkJBjHh6Oi87IaDXcXR-2BZoBogqGageZ7DQmlYSwofF3aUJ0lYcYiyT2YGPMBgynh7IEpZd87K9I2KnwdbRS0-2FUyocVmZ9x0Li6CEHrLsCNkJ-2B8FtoxGzMZNJf-2Fv0-3D



New Defects reported by Coverity Scan for LibreOffice

2024-01-28 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

16 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 16 of 16 defect(s)


** CID 1588088:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/ui/drawfunc/drawsh.cxx: 565 in 
ScDrawShell::ExecuteTextAttrDlg(SfxRequest &)()



*** CID 1588088:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/ui/drawfunc/drawsh.cxx: 565 in 
ScDrawShell::ExecuteTextAttrDlg(SfxRequest &)()
559 weld::Window* pWin = rViewData.GetDialogParent();
560 VclPtr pDlg(pFact->CreateTextTabDialog(pWin, 
&aNewAttr, pView));
561 
562 auto xRequest = std::make_shared(rReq);
563 rReq.Ignore(); // the 'old' request is not relevant any more
564 pDlg->StartExecuteAsync(
>>> CID 1588088:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "xRequest" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
565 [pDlg, xRequest, bHasMarked, pView] (sal_Int32 nResult)->void
566 {
567 if ( RET_OK == nResult )
568 {
569 if ( bHasMarked )
570 pView->SetAttributes( *pDlg->GetOutputItemSet() );

** CID 1588087:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/ui/view/tabvwshf.cxx: 695 in 
ScTabViewShell::ExecuteMoveTable(SfxRequest &)()



*** CID 1588087:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/ui/view/tabvwshf.cxx: 695 in 
ScTabViewShell::ExecuteMoveTable(SfxRequest &)()
689 
690 // We support direct renaming of sheet only when one sheet
691 // is selected.
692 pDlg->EnableRenameTable(nTabSelCount == 1);
693 
694 std::shared_ptr pReq = 
std::make_shared(rReq);
>>> CID 1588087:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "pReq" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
695 pDlg->StartExecuteAsync([this, pDlg, pReq,
696  nContextMenuTab](sal_Int32 
nResult) {
697 
698 OUString aTableName;
699 sal_uInt16 nDocument = 0;
700 SCTAB nTargetIndex = -1;

** CID 1588086:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svx/source/dialog/grfflt.cxx: 266 in handleGraphicFilterDialog(const 
VclPtr &, const Graphic &, std::function)()



*** CID 1588086:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svx/source/dialog/grfflt.cxx: 266 in handleGraphicFilterDialog(const 
VclPtr &, const Graphic &, std::function)()
260 
261 static void handleGraphicFilterDialog(const 
VclPtr& pDlg,
262 const Graphic& aInputGraphic,
263 std::function f)
264 {
265 pDlg->StartExecuteAsync(
>>> CID 1588086:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "f" is copied in call to copy constructor "std::function>> (GraphicObject)>", when it could be moved instead.
266 [pDlg, aInputGraphic, f] (sal_Int32 nResult)->void
267 {
268 if (nResult == RET_OK)
269 {
270 Graphic aOutputGraphic = pDlg->GetFilteredGraphic( 
aInputGraphic, 1.0, 1.0 );
271 f(aOutputGraphic);

** CID 1588085:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/ui/view/tabvwshf.cxx: 818 in 
ScTabViewShell::ExecuteMoveTable(SfxRequest &)()



*** CID 1588085:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/ui/view/tabvwshf.cxx: 818 in 
ScTabViewShell::ExecuteMoveTable(SfxRequest &)()
812 // is selected.
813 pDlg->EnableRenameTable(nTabSelCount == 1);
814 
815 auto xRequest = std::make_shared(rReq);
816 rReq.Ignore(); // the 'old' request is not relevant any more
817 pDlg->StartExecuteAsync(
>>> CID 1588085:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "xRequest" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
818 [this, pDlg, xRequest] (sal_Int32 nResult)->void
819 {
820 if (nResult == RET_OK)
821 {
822 DoMoveTableFromDialog(*xRequest, pDlg);
823 }

** CID 1588084:(COPY_INSTEAD_OF_MOVE)
/sc/source/ui/view/tab

New Defects reported by Coverity Scan for LibreOffice

2024-01-22 Thread scan-admin
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.
29 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 1586677:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/include/rtl/string.hxx: 191 in ()



*** CID 1586677:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/include/rtl/string.hxx: 191 in ()
185 
186   The design of this class is similar to the string classes in Java
187   and so more people should have fewer understanding problems when they
188   use this class.
189 */
190 
>>> CID 1586677:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
>>> Class "rtl::OString" may benefit from adding a move assignment 
>>> operator. See other events which show the copy assignment operator being 
>>> applied to rvalues, where a move assignment may be faster.
191 class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI OString
192 {
193 public:
194 /// @cond INTERNAL
195 rtl_String * pData;
196 /// @endcond

** CID 1586676:  Performance inefficiencies  (PASS_BY_VALUE)
/workdir/UnpackedTarball/frozen/include/frozen/unordered_set.h: 77 in 
frozen::unordered_set>, (unsigned long)14, 
frozen::elsa>>, 
std::equal_to>>>::unordered_set(frozen::bits::carray>, (unsigned long)14>, const 
frozen::elsa>> &, 
const std::equal_to>> &)()



*** CID 1586676:  Performance inefficiencies  (PASS_BY_VALUE)
/workdir/UnpackedTarball/frozen/include/frozen/unordered_set.h: 77 in 
frozen::unordered_set>, (unsigned long)14, 
frozen::elsa>>, 
std::equal_to>>>::unordered_set(frozen::bits::carray>, (unsigned long)14>, const 
frozen::elsa>> &, 
const std::equal_to>> &)()
71   using const_iterator = const_pointer;
72   using iterator = const_iterator;
73 
74 public:
75   /* constructors */
76   unordered_set(unordered_set const &) = default;
>>> CID 1586676:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter keys of type 
>>> "frozen::unordered_set>> std::char_traits >, 14ul, 
>>> frozen::elsa > 
>>> >, std::equal_to>> std::char_traits > > >::container_type" (size 224 bytes) by 
>>> value, which exceeds the low threshold of 128 bytes.
77   constexpr unordered_set(container_type keys, Hash const &hash,
78   KeyEqual const &equal)
79   : equal_{equal}
80   , keys_{keys}
81   , tables_{bits::make_pmh_tables(
82 keys_, hash, bits::Get{}, default_prg_t{})} {}

** CID 1586675:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/include/rtl/ustring.hxx: 170 in ()



*** CID 1586675:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/include/rtl/ustring.hxx: 170 in ()
164   functionalities and avoids too much memory allocation.
165 
166   The design of this class is similar to the string classes in Java so
167   less people should have understanding problems when they use this 
class.
168 */
169 
>>> CID 1586675:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
>>> Class "rtl::OUString" may benefit from adding a move assignment 
>>> operator. See other events which show the copy assignment operator being 
>>> applied to rvalues, where a move assignment may be faster.
170 class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI OUString
171 {
172 public:
173 /// @cond INTERNAL
174 rtl_uString * pData;
175 /// @endcond



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DokP__OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiBq57mMQEVtuAdBaxLBfjo7rODALKx71sJkVhbvUlxq4S6r-2FAmZlhPS82Bppp4qpJL9O0ChWUUgXWYB4Lb1kJ1ifrfM3OGXwMA7i-2F9VJvjS9kJWy9ijbuFuv7twJwDIXg138-2B9DE6bWTiiqFgRmr4WdKR8lQ2k5uWlWjIkL3LChQ-3D



New Defects reported by Coverity Scan for LibreOffice

2024-01-20 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 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 1 of 1 defect(s)


** CID 1586650:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/unoobj/docuno.cxx: 905 in 
ScModelObj::hyperlinkInfoAtPosition(int, int)()



*** CID 1586650:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/unoobj/docuno.cxx: 905 in 
ScModelObj::hyperlinkInfoAtPosition(int, int)()
899 ScGridWindow* pGridWindow = pViewData->GetActiveWin();
900 if (pGridWindow)
901 {
902 const Point point(x * pViewData->GetPPTX(), y * 
pViewData->GetPPTY());
903 OUString name;
904 OUString url;
>>> CID 1586650:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetEditUrl" without checking return value (as is done 
>>> elsewhere 5 out of 6 times).
905 pGridWindow->GetEditUrl(point, &name, &url);
906 return url;
907 }
908 }
909 
910 return OUString();



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DnUrI_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJigMIYWjJCK1vu-2FWSOCMbK49YKbIqBEICRToIbplFHxQONVGv4DOSTa-2FoZ2DBRXPdZ0zXtrsONRIuiyepXm7RmkqwiK7AjbSL5SR1fqIeH4evOJrTe5Ak6kwfS3ndnldfPYcGUtMRr78jPA88Ag9nMYQjdk0G3YlK8ZeLc9FSBzAo-3D



New Defects reported by Coverity Scan for LibreOffice

2024-01-15 Thread scan-admin
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::PatternSpan>(std::vector> &, mdds::flat_segment_tree::const_iterator, 
mdds::flat_segment_tree::const_iterator)()



*** CID 1586339:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/inc/fstalgorithm.hxx: 67 in sc::buildSpanWithValue::PatternSpan>(std::vector> &, mdds::flat_segment_tree::const_iterator, 
mdds::flat_segment_tree::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-2F9F2XPBcBm2BNnPiSHxWPOELPnIx

New Defects reported by Coverity Scan for LibreOffice

2024-01-14 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
28 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 1 of 1 defect(s)


** CID 1585558:  Uninitialized variables  (USE_AFTER_MOVE)
/chart2/source/model/main/ChartModel.cxx: 181 in 
chart::ChartModel::ChartModel(const chart::ChartModel&)()



*** CID 1585558:  Uninitialized variables  (USE_AFTER_MOVE)
/chart2/source/model/main/ChartModel.cxx: 181 in 
chart::ChartModel::ChartModel(const chart::ChartModel&)()
175 }
176 }
177 
178 ModifyListenerHelper::addListener( xNewTitle, xListener );
179 if( xNewDiagram && xListener)
180 xNewDiagram->addModifyListener( xListener );
>>> CID 1585558:  Uninitialized variables  (USE_AFTER_MOVE)
>>> "xNewPageBackground" is used after it has been already moved.
181 if( xNewPageBackground && xListener)
182 xNewPageBackground->addModifyListener( xListener );
183 xListener.clear();
184 }
185 osl_atomic_decrement(&m_refCount);
186 }



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DVt8V_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi0T52ytdbCmibfcUwJt5Y8LmM1MMgE-2FoFZM0VJ-2BMINHo0lN7m69t7-2BhAGgRb3TpF-2F31TqerErn4dvsM3By8iV1G9AsheOWzibLqAo8903MikkuO4bg2RezIEFMNvTGzaoJhyrXi3zxGa7MQJtipfrMwJN6gsKFJg-2FCis6Fwlq8fg-3D



New Defects reported by Coverity Scan for LibreOffice

2024-01-13 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
40 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 4 of 4 defect(s)


** CID 1585309:  Null pointer dereferences  (REVERSE_INULL)
/svl/source/items/itemset.cxx: 339 in implCreateItemEntry(SfxItemPool &, const 
SfxPoolItem *, unsigned short, bool)()



*** CID 1585309:  Null pointer dereferences  (REVERSE_INULL)
/svl/source/items/itemset.cxx: 339 in implCreateItemEntry(SfxItemPool &, const 
SfxPoolItem *, unsigned short, bool)()
333 pTargetPool = pTargetPool->GetSecondaryPool();
334 
335 // if this goes wrong, an Item with invalid ID for this pool is
336 // processed. This is not allowed (and should not happen, e.g.
337 // ItemSets already have WhichRanges that are checked against
338 // their Pool)
>>> CID 1585309:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pTargetPool" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
339 if (nullptr == pTargetPool)
340 {
341 assert(false);
342 return pSource;
343 }
344 

** CID 1585308:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/misc/swruler.cxx: 101 in 
SwCommentRuler::SwCommentRuler(SwViewShell *, vcl::Window *, SwEditWin *, 
SvxRulerSupportFlags, SfxBindings &, long)()



*** CID 1585308:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/misc/swruler.cxx: 101 in 
SwCommentRuler::SwCommentRuler(SwViewShell *, vcl::Window *, SwEditWin *, 
SvxRulerSupportFlags, SfxBindings &, long)()
95 maFadeTimer.SetInvokeHandler(LINK(this, SwCommentRuler, 
FadeHandler));
96 
97 // we have a little bit more space, as we don't draw ruler ticks
98 vcl::Font aFont(maVirDev->GetFont());
99 aFont.SetFontHeight(aFont.GetFontHeight() + 1);
100 maVirDev->SetFont(aFont);
>>> CID 1585308:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mbIsDrag" is not initialized in this 
>>> constructor nor in any functions that it calls.
101 }
102 
103 SwCommentRuler::~SwCommentRuler() { disposeOnce(); }
104 
105 void SwCommentRuler::dispose()
106 {

** CID 1585307:(OVERRUN)
/chart2/source/view/charttypes/VSeriesPlotter.cxx: 2344 in 
chart::VSeriesPlotter::getRenderOrder() const()
/chart2/source/view/charttypes/VSeriesPlotter.cxx: 2345 in 
chart::VSeriesPlotter::getRenderOrder() const()



*** CID 1585307:(OVERRUN)
/chart2/source/view/charttypes/VSeriesPlotter.cxx: 2344 in 
chart::VSeriesPlotter::getRenderOrder() const()
2338 } // unnamed
2339 
2340 sal_Int32 VSeriesPlotter::getRenderOrder() const
2341 {
2342 OUString aChartType = m_xChartTypeModel->getChartType();
2343 for (size_t n = 0; n < sizeof(pairList); ++n) {
>>> CID 1585307:(OVERRUN)
>>> Overrunning array "chartpairList" of 10 16-byte elements 
>>> at element index 159 (byte offset 2559) using index "n" (which evaluates to 
>>> 159).
2344 if (aChartType.equalsIgnoreAsciiCase(pairList[n].chartName)) {
2345 return pairList[n].renderOrder;
2346 }
2347 }
2348 SAL_WARN("chart2", "Unsupported chart type in getRenderOrder()");
2349 return 0;
/chart2/source/view/charttypes/VSeriesPlotter.cxx: 2345 in 
chart::VSeriesPlotter::getRenderOrder() const()
2339 
2340 sal_Int32 VSeriesPlotter::getRenderOrder() const
2341 {
2342 OUString aChartType = m_xChartTypeModel->getChartType();
2343 for (size_t n = 0; n < sizeof(pairList); ++n) {
2344 if (aChartType.equalsIgnoreAsciiCase(pairList[n].chartName)) {
>>> CID 1585307:(OVERRUN)
>>> Overrunning array "chartpairList" of 10 16-byte elements 
>>> at element index 159 (byte offset 2559) using index "n" (which evaluates to 
>>> 159).
2345 return pairList[n].renderOrder;
2346 }
2347 }
2348 SAL_WARN("chart2", "Unsupported chart type in getRenderOrder()");
2349 return 0;
2350 }

** CID 1585306:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/cctrl/tbzoomsliderctrl.cxx: 228 in 
ScZoomSlider::ScZoomSlider(com::sun::star::uno::Reference,
 unsigned short)()



*** CID 1585306:  Uninitialized members  (UNINIT_CTOR)

New Defects reported by Coverity Scan for LibreOffice

2024-01-10 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
19 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 1 of 1 defect(s)


** CID 1583765:  Memory - corruptions  (BAD_FREE)



*** CID 1583765:  Memory - corruptions  (BAD_FREE)
/sw/source/core/txtnode/thints.cxx: 1183 in MakeTextAttr(SwDoc &, const 
SfxItemSet &, int, int)()
1177 sal_Int32 nStt, sal_Int32 nEnd )
1178 {
1179 IStyleAccess& rStyleAccess = rDoc.GetIStyleAccess();
1180 const std::shared_ptr pAutoStyle = 
rStyleAccess.getAutomaticStyle( rSet, IStyleAccess::AUTO_STYLE_CHAR );
1181 SwFormatAutoFormat aNewAutoFormat;
1182 aNewAutoFormat.SetStyleHandle( pAutoStyle );
>>> CID 1583765:  Memory - corruptions  (BAD_FREE)
>>> "MakeTextAttr" frees address of "aNewAutoFormat".
1183 SwTextAttr* pNew = MakeTextAttr( rDoc, aNewAutoFormat, nStt, nEnd 
);
1184 return pNew;
1185 }
1186 
1187 // delete the text attribute and unregister its item at the pool
1188 void SwTextNode::DestroyAttr( SwTextAttr* pAttr )



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3D442V_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiQVe0uTPxDqiopw-2Bjnu9uM-2FuJPMryRdazLTC4bjKBq-2FvkkxrvmRJgNdX5HLVSNJONrKqpO26p6SYuP9eq5Q0iByER-2B3OlKOOMGaSzx9LSGPKPjM4Z8hAjs10HNSwvgE3ZxNmSwEGBD4JkKadw3N5hBTUdhmk8xfXAU6gOPAWgS-2BI-3D



New Defects reported by Coverity Scan for LibreOffice

2024-01-09 Thread scan-admin
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.
147 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 1583748:(FORWARD_NULL)



*** CID 1583748:(FORWARD_NULL)
/sc/source/ui/app/inputhdl.cxx: 3864 in ScInputHandler::KeyInput(const KeyEvent 
&, bool)()
3858 
3859 if (pActiveViewSh)
3860 pActiveViewSh->MoveCursorEnter( bShift && 
!bControl );
3861 
3862 ScModule* pScMod = SC_MOD();
3863 const ScInputOptions& rOpt = pScMod->GetInputOptions();
>>> CID 1583748:(FORWARD_NULL)
>>> Passing null pointer "this->pActiveViewSh" to "GetMoveKeepEdit", which 
>>> dereferences it.
3864 if ( (rOpt.GetMoveKeepEdit() && 
!comphelper::LibreOfficeKit::isActive())
3865 || (pActiveViewSh->GetMoveKeepEdit() && 
comphelper::LibreOfficeKit::isActive()) )
3866 pScMod->SetInputMode( SC_INPUT_TABLE );
3867 
3868 bUsed = true;
3869 }
/sc/source/ui/app/inputhdl.cxx: 3818 in ScInputHandler::KeyInput(const KeyEvent 
&, bool)()
3812 if (pActiveViewSh)
3813 pActiveViewSh->FindNextUnprot( bShift, true );
3814 
3815 ScModule* pScMod = SC_MOD();
3816 const ScInputOptions& rOpt = pScMod->GetInputOptions();
3817 
>>> CID 1583748:(FORWARD_NULL)
>>> Passing null pointer "this->pActiveViewSh" to "GetMoveKeepEdit", which 
>>> dereferences it.
3818 if ( (rOpt.GetMoveKeepEdit() && 
!comphelper::LibreOfficeKit::isActive())
3819  || (pActiveViewSh->GetMoveKeepEdit() && 
comphelper::LibreOfficeKit::isActive()) )
3820 pScMod->SetInputMode( SC_INPUT_TABLE );
3821 
3822 return true;
3823 }

** CID 1583747:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/basctl/source/basicide/baside2.cxx: 1559 in 
basctl::ModulWindowLayout::ApplyColorSchemeToCurrentWindow(rtl::OUString)()



*** CID 1583747:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/basctl/source/basicide/baside2.cxx: 1559 in 
basctl::ModulWindowLayout::ApplyColorSchemeToCurrentWindow(rtl::OUString)()
1553 
1554 // Applies the color scheme to the current window and updates color 
definitions;
1555 // note that other ModulWindow instances are not affected by calling 
this method
1556 void ModulWindowLayout::ApplyColorSchemeToCurrentWindow(OUString 
aSchemeId)
1557 {
1558 // Apply new color scheme to the UI
>>> CID 1583747:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aSchemeId" is copied in a call to copy assignment "operator =", when 
>>> it could be moved instead.
1559 m_sColorSchemeId = aSchemeId;
1560 aSyntaxColors.ApplyColorScheme(m_sColorSchemeId, false);
1561 }
1562 
1563 ModulWindowLayout::SyntaxColors::SyntaxColors ()
1564 : pEditor(nullptr)

** CID 1583746:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/basctl/source/basicide/ColorSchemeDialog.cxx: 37 in 
basctl::ColorSchemeDialog::ColorSchemeDialog(weld::Window *, 
VclPtr)()



*** CID 1583746:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/basctl/source/basicide/ColorSchemeDialog.cxx: 37 in 
basctl::ColorSchemeDialog::ColorSchemeDialog(weld::Window *, 
VclPtr)()
31 
32 namespace basctl
33 {
34 ColorSchemeDialog::ColorSchemeDialog(weld::Window* pParent,
35  VclPtr 
pModulWinLayout)
36 : GenericDialogController(pParent, 
"modules/BasicIDE/ui/colorscheme.ui", "ColorSchemeDialog")
>>> CID 1583746:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "pModulWinLayout" is copied in call to copy constructor 
>>> "VclPtr", when it could be moved instead.
37 , m_pModulWinLayout(pModulWinLayout)
38 , m_xSchemeList(m_xBuilder->weld_tree_view("schemelist"))
39 , m_xUseAppCollors(m_xBuilder->weld_radio_button("opt_appcolors"))
40 , m_xUseScheme(m_xBuilder->weld_radio_button("opt_usescheme"))
41 , m_xOk(m_xBuilder->weld_button("btn_ok"))
42 {

** CID 1583745:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/basctl/source/basicide/baside2.hxx: 451 in 
basctl::ModulWindowLayout::SyntaxColors::SetActiveColorSchemeId(rtl::OUString)()


__

New Defects reported by Coverity Scan for LibreOffice

2024-01-07 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

11 new defect(s) introduced to LibreOffice found with Coverity Scan.
46 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 11 of 11 defect(s)


** CID 1583700:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/token.cxx: 3357 in 
ScTokenArray::AdjustReferenceOnShift(const sc::RefUpdateContext &, const 
ScAddress &)()



*** CID 1583700:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/token.cxx: 3357 in 
ScTokenArray::AdjustReferenceOnShift(const sc::RefUpdateContext &, const 
ScAddress &)()
3351 ;   // nothing
3352 }
3353 }
3354 }
3355 }
3356 
>>> CID 1583700:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "aRes". Field "aRes.nTab" is uninitialized.
3357 return aRes;
3358 }
3359 
3360 sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
3361 const sc::RefUpdateContext& rCxt, const ScAddress& rOldPos, const 
ScAddress& rNewPos )
3362 {

** CID 1583699:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/token.cxx: 4395 in 
ScTokenArray::AdjustReferenceOnInsertedTab(const sc::RefUpdateInsertTabContext 
&, const ScAddress &)()



*** CID 1583699:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/token.cxx: 4395 in 
ScTokenArray::AdjustReferenceOnInsertedTab(const sc::RefUpdateInsertTabContext 
&, const ScAddress &)()
4389 default:
4390 ;   // nothing
4391 }
4392 }
4393 }
4394 }
>>> CID 1583699:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "aRes". Field "aRes.nTab" is uninitialized.
4395 return aRes;
4396 }
4397 
4398 namespace {
4399 
4400 bool adjustTabOnMove( ScAddress& rPos, const 
sc::RefUpdateMoveTabContext& rCxt )

** CID 1583698:(MISSING_MOVE_ASSIGNMENT)
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl/ref.hxx: 45 in ()
/include/rtl

New Defects reported by Coverity Scan for LibreOffice

2024-01-05 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
300 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 4 of 4 defect(s)


** CID 1560054:(MISSING_MOVE_ASSIGNMENT)
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h: 183 in ()
/include/com/sun/star/uno/Reference.h:

New Defects reported by Coverity Scan for LibreOffice

2023-12-31 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
32 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 1 of 1 defect(s)


** CID 1559993:(DIVIDE_BY_ZERO)
/sw/source/ui/dialog/wordcountdialog.cxx: 73 in 
SwWordCountFloatDlg::SetValues(const SwDocStat &, const SwDocStat &)()
/sw/source/ui/dialog/wordcountdialog.cxx: 75 in 
SwWordCountFloatDlg::SetValues(const SwDocStat &, const SwDocStat &)()



*** CID 1559993:(DIVIDE_BY_ZERO)
/sw/source/ui/dialog/wordcountdialog.cxx: 73 in 
SwWordCountFloatDlg::SetValues(const SwDocStat &, const SwDocStat &)()
67 setValue(*m_xDocCjkcharsFT, rDoc.nAsianWord, rLocaleData);
68 setValue(*m_xDocComments, rCurrent.nComments, rLocaleData);
69 
70 if (m_xStandardizedPagesLabelFT->get_visible())
71 {
72 sal_Int64 nCharsPerStandardizedPage = 
officecfg::Office::Writer::WordCount::StandardizedPageSize::get();
>>> CID 1559993:(DIVIDE_BY_ZERO)
>>> In expression "static_cast(rCurrent.nChar) / 
>>> nCharsPerStandardizedPage", division by expression 
>>> "nCharsPerStandardizedPage" which may be zero has undefined behavior.
73 setDoubleValue(*m_xCurrentStandardizedPagesFT,
74 static_cast(rCurrent.nChar) / 
nCharsPerStandardizedPage);
75 setDoubleValue(*m_xDocStandardizedPagesFT,
76 static_cast(rDoc.nChar) / nCharsPerStandardizedPage);
77 }
78 
/sw/source/ui/dialog/wordcountdialog.cxx: 75 in 
SwWordCountFloatDlg::SetValues(const SwDocStat &, const SwDocStat &)()
69 
70 if (m_xStandardizedPagesLabelFT->get_visible())
71 {
72 sal_Int64 nCharsPerStandardizedPage = 
officecfg::Office::Writer::WordCount::StandardizedPageSize::get();
73 setDoubleValue(*m_xCurrentStandardizedPagesFT,
74 static_cast(rCurrent.nChar) / 
nCharsPerStandardizedPage);
>>> CID 1559993:(DIVIDE_BY_ZERO)
>>> In expression "static_cast(rDoc.nChar) / 
>>> nCharsPerStandardizedPage", division by expression 
>>> "nCharsPerStandardizedPage" which may be zero has undefined behavior.
75 setDoubleValue(*m_xDocStandardizedPagesFT,
76 static_cast(rDoc.nChar) / nCharsPerStandardizedPage);
77 }
78 
79 bool bShowCJK = (SvtCJKOptions::IsAnyEnabled() || rDoc.nAsianWord);
80 bool bToggleCJK = m_xCurrentCjkcharsFT->get_visible() != bShowCJK;



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DO6zB_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJigysQen5OMfnry610iZ10vzbkx1obUyWBwekGKbjMuStv74Cl-2B6kiQvtj68-2F6eJKhc1RzQ2b47pSEKGRPx3z-2Fn5Opuu3pN5YFr5FgMl2tpxx5YjNYIm1I0IBPPViZyKyI-2FXdttgv19DYUIS8VhklVNYB30oc1qKEDoO1lafgp5xU-3D



New Defects reported by Coverity Scan for LibreOffice

2023-12-29 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

25 new defect(s) introduced to LibreOffice found with Coverity Scan.
10 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 20 of 25 defect(s)


** CID 1559969:  Uninitialized variables  (UNINIT)



*** CID 1559969:  Uninitialized variables  (UNINIT)
/sc/source/core/data/poolcach.cxx: 74 in ScItemPoolCache::ApplyTo(const 
CellAttributeHolder &)()
68 }
69 else
70 {
71 pNewItem->GetItemSet().Put(*pSetToPut);
72 }
73 
>>> CID 1559969:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "pNewItem->pName._M_payload._M_payload" when 
>>> calling "CellAttributeHolder".
74 m_aCache.emplace_back(rOrigItem, CellAttributeHolder(pNewItem, 
true));
75 return m_aCache.back().aModified;
76 }
77 
78 

** CID 1559968:  Uninitialized variables  (UNINIT)



*** CID 1559968:  Uninitialized variables  (UNINIT)
/sc/source/ui/undo/undocell.cxx: 252 in ScUndoEnterData::Undo()()
246 rDoc.ApplyAttr(maPos.Col(), maPos.Row(), rVal.mnTab,
247 SfxUInt32Item(ATTR_VALUE_FORMAT, 
rVal.mnFormat));
248 else
249 {
250 ScPatternAttr* pPattern(new 
ScPatternAttr(*rDoc.GetPattern(maPos.Col(), maPos.Row(), rVal.mnTab)));
251 pPattern->GetItemSet().ClearItem( ATTR_VALUE_FORMAT );
>>> CID 1559968:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "pPattern->pName._M_payload._M_payload" when 
>>> calling "CellAttributeHolder".
252 rDoc.SetPattern(maPos.Col(), maPos.Row(), rVal.mnTab, 
CellAttributeHolder(pPattern, true));
253 }
254 pDocShell->PostPaintCell(maPos.Col(), maPos.Row(), rVal.mnTab);
255 }
256 
257 ScChangeTrack* pChangeTrack = rDoc.GetChangeTrack();

** CID 1559967:  Uninitialized variables  (UNINIT)



*** CID 1559967:  Uninitialized variables  (UNINIT)
/sc/source/core/data/attarray.cxx: 1624 in ScAttrArray::ApplyFlags(int, int, 
ScMF)()
1618 if ( (nOldValue | nFlags) != nOldValue )
1619 {
1620 nRow = mvData[nIndex].nEndRow;
1621 SCROW nAttrRow = std::min( nRow, nEndRow );
1622 ScPatternAttr* pNewPattern(new 
ScPatternAttr(*pOldPattern));
1623 pNewPattern->GetItemSet().Put( ScMergeFlagAttr( nOldValue 
| nFlags ) );
>>> CID 1559967:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "pNewPattern->pName._M_payload._M_payload" 
>>> when calling "CellAttributeHolder".
1624 SetPatternArea( nThisRow, nAttrRow, 
CellAttributeHolder(pNewPattern, true) );
1625 Search( nThisRow, nIndex );  // data changed
1626 bChanged = true;
1627 }
1628 
1629 ++nIndex;

** CID 1559966:  Uninitialized variables  (UNINIT)



*** CID 1559966:  Uninitialized variables  (UNINIT)
/sc/source/core/data/attarray.cxx: 2439 in ScAttrArray::CopyArea(int, int, 
long, ScAttrArray&, ScMF) const()
2433 
2434 if (bSameCellAttributeHelper)
2435 aNewPattern.setScPatternAttr(pTmpPattern, true);
2436 else
2437 {
2438 aNewPattern = pTmpPattern->MigrateToDocument( 
&rAttrArray.rDocument, &rDocument );
>>> CID 1559966:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "pTmpPattern->pName._M_payload._M_payload" 
>>> when calling "~ScPatternAttr".
2439 delete pTmpPattern;
2440 }
2441 }
2442 else
2443 {
2444 if (bSameCellAttributeHelper)

** CID 1559965:  Memory - corruptions  (USE_AFTER_FREE)
/sc/inc/fstalgorithm.hxx: 69 in sc::buildSpanWithValue::PatternSpan>(std::vector> &, mdds::flat_segment_tree::const_iterator, 
mdds::flat_segment_tree::const_iterator)()



*** CID 1559965:  Memory - corruptions  (USE_AFTER_FREE)
/sc/inc/fstalgorithm.hxx: 69 in sc::buildSpanWithValue::PatternSpan>(std::vector> &, mdds::flat_segment_tree::const_iterator, 
mdds::flat_segment_tree::const_iterator)()
63 rSpans.push_back(Span(nIndex1, nIndex2, nLastVal));
64

New Defects reported by Coverity Scan for LibreOffice

2023-12-24 Thread scan-admin
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.
74 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 1559939:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svx/source/tbxctrls/PaletteManager.cxx: 409 in 
PaletteManager::PopupColorPicker(weld::Window *, const rtl::OUString &, const 
Color &)()



*** CID 1559939:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svx/source/tbxctrls/PaletteManager.cxx: 409 in 
PaletteManager::PopupColorPicker(weld::Window *, const rtl::OUString &, const 
Color &)()
403 // The calling object goes away during aColorDlg.Execute(), so we 
must copy this
404 OUString aCommandCopy = aCommand;
405 m_pColorDlg = std::make_unique();
406 m_pColorDlg->SetColor(rInitialColor);
407 m_pColorDlg->SetMode(svtools::ColorPickerMode::Modify);
408 std::shared_ptr xSelf(shared_from_this());
>>> CID 1559939:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "xSelf" is copied in call to copy constructor 
>>> "std::shared_ptr", when it could be moved instead.
409 m_pColorDlg->ExecuteAsync(pParent, [xSelf, aCommandCopy] (sal_Int32 
nResult) {
410 if (nResult == RET_OK)
411 {
412 Color aLastColor = xSelf->m_pColorDlg->GetColor();
413 OUString sColorName = "#" + 
aLastColor.AsRGBHexString().toAsciiUpperCase();
414 NamedColor aNamedColor(aLastColor, sColorName);

** CID 1559938:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1559938:  Null pointer dereferences  (NULL_RETURNS)
/sd/source/ui/dlg/LayerTabBar.cxx: 182 in 
sd::LayerTabBar::BringLayerObjectsToAttention(unsigned short)()
176 SdrLayerAdmin& rLayerAdmin = 
pDrViewSh->GetDoc()->GetLayerAdmin();
177 SdrObjListIter aIter(pDrViewSh->GetActualPage(), 
SdrIterMode::DeepWithGroups);
178 while (aIter.IsMore())
179 {
180 SdrObject* pObj = aIter.Next();
181 assert(pObj != nullptr);
>>> CID 1559938:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 
>>> "rLayerAdmin->GetLayerPerID(pObj->GetLayer())->GetName()" when calling 
>>> "operator ==".
182 if (pObj && (aLayerName == 
rLayerAdmin.GetLayerPerID(pObj->GetLayer())->GetName()))
183 {
184 ::tools::Rectangle aRect(pObj->GetLogicRect());
185 if (!aRect.IsEmpty())
186 aRanges.emplace_back(aRect.Left(), aRect.Top(), 
aRect.Right(), aRect.Bottom());
187 // skip over objects in groups

** CID 1559937:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/cui/source/dialogs/colorpicker.cxx: 1349 in 
cuiColorPicker::startExecuteModal(const 
com::sun::star::uno::Reference
 &)()



*** CID 1559937:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/cui/source/dialogs/colorpicker.cxx: 1349 in 
cuiColorPicker::startExecuteModal(const 
com::sun::star::uno::Reference
 &)()
1343 }
1344 
1345 void SAL_CALL ColorPicker::startExecuteModal( const 
css::uno::Reference< css::ui::dialogs::XDialogClosedListener >& xListener )
1346 {
1347 std::shared_ptr xDlg = 
std::make_shared(Application::GetFrameWeld(mxParent), 
mnColor, mnMode);
1348 rtl::Reference xThis(this);
>>> CID 1559937:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "xThis" is copied in call to copy constructor 
>>> "rtl::Reference::ColorPicker>", when it could be moved 
>>> instead.
1349 weld::DialogController::runAsync(xDlg, [xThis, xDlg, xListener] 
(sal_Int32 nResult) {
1350 if (nResult)
1351 xThis->mnColor = xDlg->GetColor();
1352 
1353 sal_Int16 nRet = static_cast(nResult);
1354 css::ui::dialogs::DialogClosedEvent aEvent( *xThis, nRet );



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DlVcR_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiAleIz1OOTD8HuEQKQK0THk9I6rxelM25GK01hHVmv8r0qijbRzucdNDLbQjahnlPxHQrfGDlThnqbOCE4ng0VUNyRzYoMfA5bkJTpVO15dOKlEJhP

New Defects reported by Coverity Scan for LibreOffice

2023-12-22 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

19 new defect(s) introduced to LibreOffice found with Coverity Scan.
23 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 19 of 19 defect(s)


** CID 1559884:  Uninitialized variables  (UNINIT)



*** CID 1559884:  Uninitialized variables  (UNINIT)
/sw/source/uibase/sidebar/PageSizeControl.cxx: 124 in 
sw::sidebar::PageSizeControl::PageSizeControl(PageSizePopup *, weld::Widget *)()
118 bool bLandscape = false;
119 const SvxSizeItem* pSize(nullptr);
120 if (SfxViewFrame* pViewFrm = SfxViewFrame::Current())
121 {
122 SfxPoolItemHolder aResult;
123 
pViewFrm->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE, aResult );
>>> CID 1559884:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "aResult.m_bDeleted" when calling "getItem".
124 bLandscape = static_cast(aResult.getItem())->IsLandscape();
125 
pViewFrm->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_SIZE, 
aResult);
126 pSize = static_cast(aResult.getItem());
127 }
128 
129 const LocaleDataWrapper& localeDataWrapper = 
Application::GetSettings().GetLocaleDataWrapper();

** CID 1559883:  Uninitialized variables  (UNINIT)



*** CID 1559883:  Uninitialized variables  (UNINIT)
/sw/source/uibase/sidebar/PageColumnControl.cxx: 44 in 
sw::sidebar::PageColumnControl::PageColumnControl(PageColumnPopup *, 
weld::Widget *)()
38 {
39 bool bLandscape = false;
40 if (SfxViewFrame* pViewFrm = SfxViewFrame::Current())
41 {
42 SfxPoolItemHolder aResult;
43 
pViewFrm->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE, aResult);
>>> CID 1559883:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "aResult.m_bDeleted" when calling "getItem".
44 const SvxPageItem* pPageItem(static_cast(aResult.getItem()));
45 bLandscape = pPageItem->IsLandscape();
46 }
47 
48 if ( bLandscape )
49 {

** CID 1559882:  Uninitialized members  (UNINIT_CTOR)
/svl/source/items/itemset.cxx: 103 in 
SfxPoolItemHolder::SfxPoolItemHolder(const SfxPoolItemHolder&)()



*** CID 1559882:  Uninitialized members  (UNINIT_CTOR)
/svl/source/items/itemset.cxx: 103 in 
SfxPoolItemHolder::SfxPoolItemHolder(const SfxPoolItemHolder&)()
97 assert(!rHolder.isDeleted() && "Destructed instance used (!)");
98 nAllocatedSfxPoolItemHolderCount++;
99 nUsedSfxPoolItemHolderCount++;
100 #endif
101 if (nullptr != m_pItem)
102 m_pItem = implCreateItemEntry(*m_pPool, m_pItem, 
m_pItem->Which(), false);
>>> CID 1559882:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_bDeleted" is not initialized in this 
>>> constructor nor in any functions that it calls.
103 }
104 
105 SfxPoolItemHolder::~SfxPoolItemHolder()
106 {
107 #ifdef DBG_UTIL
108 assert(!isDeleted() && "Destructed instance used (!)");

** CID 1559881:  Uninitialized variables  (UNINIT)



*** CID 1559881:  Uninitialized variables  (UNINIT)
/sw/source/uibase/sidebar/PageSizeControl.cxx: 202 in 
sw::sidebar::PageSizeControl::ExecuteSizeChange(Paper)()
196 SfxViewFrame* pViewFrm = SfxViewFrame::Current();
197 if (!pViewFrm)
198 return;
199 
200 SfxPoolItemHolder aResult;
201 pViewFrm->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE, 
aResult);
>>> CID 1559881:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "aResult.m_bDeleted" when calling "getItem".
202 const SvxPageItem* pItem(static_cast(aResult.getItem()));
203 bLandscape = pItem->IsLandscape();
204 
205 SvxSizeItem aPageSizeItem(SID_ATTR_PAGE_SIZE);
206 Size aPageSize = SvxPaperInfo::GetPaperSize( ePaper, eUnit );
207 if ( bLandscape )

** CID 1559880:  Uninitialized variables  (UNINIT)



*** CID 1559880:  Uninitialized variables  (UNINIT)
/sd/source/ui/unoidl/unomodel.cxx: 2472 in 
SdXImpressDocument::isMasterViewMode()()
2466 return false;
2467 
2468 if (pViewSh->GetDispatcher())
2469 {
2470 SfxPoolIte

New Defects reported by Coverity Scan for LibreOffice

2023-12-21 Thread scan-admin
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.
49 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 2 of 2 defect(s)


** CID 1559857:  Memory - corruptions  (OVERRUN)
/sd/source/filter/eppt/pptx-epptbase.cxx: 434 in PPTWriterBase::GetLayout(int)()



*** CID 1559857:  Memory - corruptions  (OVERRUN)
/sd/source/filter/eppt/pptx-epptbase.cxx: 434 in PPTWriterBase::GetLayout(int)()
428 return pPHLayout[ GetLayoutOffsetFixed( rXPropSet ) ];
429 }
430 
431 PHLayout const & PPTWriterBase::GetLayout( sal_Int32 nOffset )
432 {
433 if( nOffset >= 0 && nOffset < EPP_LAYOUT_SIZE )
>>> CID 1559857:  Memory - corruptions  (OVERRUN)
>>> "pPHLayout[nOffset]" evaluates to an address that is at byte offset 700 
>>> of an array of 500 bytes.
434 return pPHLayout[ nOffset ];
435 
436 SAL_INFO("sd.eppt", "asked " << nOffset << " for layout outside of 
0, " << EPP_LAYOUT_SIZE  << " array scope");
437 
438 return pPHLayout[ 0 ];
439 }

** CID 1559856:  Null pointer dereferences  (FORWARD_NULL)
/sfx2/source/view/viewfrm.cxx: 2551 in 
SfxViewFrame::SwitchToViewShell_Impl(unsigned short, bool)()



*** CID 1559856:  Null pointer dereferences  (FORWARD_NULL)
/sfx2/source/view/viewfrm.cxx: 2551 in 
SfxViewFrame::SwitchToViewShell_Impl(unsigned short, bool)()
2545 SfxObjectFactory& rDocFact = GetObjectShell()->GetFactory();
2546 const SfxInterfaceId nViewId = ( bIsIndex || !nViewIdOrNo ) ? 
rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : 
SfxInterfaceId(nViewIdOrNo);
2547 
2548 // save the view data of the old view, so it can be restored 
later on (when needed)
2549 SaveCurrentViewData_Impl( nViewId );
2550 
>>> CID 1559856:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pOldSh" to "SetDying", which dereferences it. 
>>> (The dereference happens because this is a virtual function call.)
2551 pOldSh->SetDying();
2552 
2553 // create and load new ViewShell
2554 SfxViewShell* pNewSh = LoadViewIntoFrame_Impl(
2555 *GetObjectShell(),
2556 GetFrame().GetFrameInterface(),



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3D7U63_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi3kiqkTfWIAMClNn6pAvWk2hXxzsNdrgaYZbALoaTa1-2Biq7JePOTZbSgFFo-2F6j9-2FucNjekMO5b5PWZ9K50-2FFfifv6XhUPZlKcRNzCkwaDmGyQWDIAgoVC5fsVmt9-2FGJ8vnJ2LKLsnwjMhNfARuosk-2B1V7dFJMI9S9nD1Ia-2F7gEEI-3D



New Defects reported by Coverity Scan for LibreOffice

2023-12-18 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
50 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 1 of 1 defect(s)


** CID 1559313:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1559313:  Null pointer dereferences  (NULL_RETURNS)
/sc/source/ui/view/output.cxx: 2604 in ScOutputData::AddPDFNotes()()
2598 
2599 // Note title is the cell address (as on 
printed note pages)
2600 ScAddress aAddress( nMergeX, nMergeY, nTab );
2601 aNote.Title = 
aAddress.Format(ScRefFlags::VALID, mpDoc, mpDoc->GetAddressConvention());
2602 
2603 // Content has to be a simple string without 
line breaks
>>> CID 1559313:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pNote" when calling 
>>> "GetText".
2604 OUString aContent = pNote->GetText();
2605 aNote.Contents = aContent.replaceAll("\n", " 
");
2606 
2607 pPDFData->CreateNote( aNoteRect, aNote );
2608 }
2609 }



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DIL98_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi2wJbLo4SieEDO47Z86J2qHiYTc68ToGCAScYAxXsrQ6h-2Brwf6c60AtoSxv7dg3zNC3VNrGJrHkEi8HaVXIezgLnlbCqRg2htZZjGIPBKjLfR-2BoQwU5PvaUsGTj8rusn-2FAP7YVtiQp25eZ1yWzNHYG2JPfFbU6D0VEQKdEUo6uu4-3D



New Defects reported by Coverity Scan for LibreOffice

2023-12-15 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
46 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 1 of 1 defect(s)


** CID 1559193:  Memory - illegal accesses  (UNINIT)
/include/tools/globname.hxx: 33 in operator <=>(const SvGUID &, const SvGUID 
&)()



*** CID 1559193:  Memory - illegal accesses  (UNINIT)
/include/tools/globname.hxx: 33 in operator <=>(const SvGUID &, const SvGUID 
&)()
27 struct SAL_WARN_UNUSED SvGUID
28 {
29 sal_uInt32 Data1;
30 sal_uInt16 Data2;
31 sal_uInt16 Data3;
32 sal_uInt8  Data4[8];
>>> CID 1559193:  Memory - illegal accesses  (UNINIT)
>>> Using uninitialized value "".
33 friend constexpr auto operator<=>(const SvGUID&, const SvGUID&) = 
default;
34 friend constexpr bool operator==(const SvGUID&, const SvGUID&) = 
default;
35 };
36 
37 class SvStream;
38 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DDQst_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiiRBXFEWdzZPNhFi3L0knIctzjmuZ2HDuSCyiB3WHpShTTsHFUrXSdYfTvciNo-2BTRMUmxKPUYv-2Fz2fXveSdEexaJc5z402TUJiXdua7bxOwWmsZChwmzYP8eLC9-2FKVxKZVsO2dT2mHlkOGobl-2FHEJwMQu-2FcXXrTY66IphEXTVGoc-3D



New Defects reported by Coverity Scan for LibreOffice

2023-12-12 Thread scan-admin
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.
70 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 2 of 2 defect(s)


** CID 1559173:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/slideshow/source/engine/eventmultiplexer.cxx: 1299 in 
slideshow::internal::EventMultiplexer::toNormalPoint(const 
com::sun::star::uno::Reference &, const 
basegfx::B2DPoint &)()



*** CID 1559173:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/slideshow/source/engine/eventmultiplexer.cxx: 1299 in 
slideshow::internal::EventMultiplexer::toNormalPoint(const 
com::sun::star::uno::Reference &, const 
basegfx::B2DPoint &)()
1293 }
1294 
1295 basegfx::B2DPoint EventMultiplexer::toNormalPoint(const 
uno::Reference& xInterface,
1296   const 
basegfx::B2DPoint& pnt)
1297 {
1298 uno::Reference xView(xInterface, 
uno::UNO_QUERY_THROW);
>>> CID 1559173:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "xView" is passed-by-value as parameter to "toNormalPoint" when it 
>>> could be moved instead.
1299 return mpImpl->toNormalPoint(xView, pnt);
1300 }
1301 
1302 } // namespace presentation
1303 

** CID 1559172:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/slideshow/source/engine/eventmultiplexer.cxx: 1292 in 
slideshow::internal::EventMultiplexer::toMatrixPoint(const 
com::sun::star::uno::Reference &, const 
basegfx::B2DPoint &)()



*** CID 1559172:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/slideshow/source/engine/eventmultiplexer.cxx: 1292 in 
slideshow::internal::EventMultiplexer::toMatrixPoint(const 
com::sun::star::uno::Reference &, const 
basegfx::B2DPoint &)()
1286 }
1287 
1288 basegfx::B2DPoint EventMultiplexer::toMatrixPoint(const 
uno::Reference& xInterface,
1289   const 
basegfx::B2DPoint& pnt)
1290 {
1291 uno::Reference xView(xInterface, 
uno::UNO_QUERY_THROW);
>>> CID 1559172:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "xView" is passed-by-value as parameter to "toMatrixPoint" when it 
>>> could be moved instead.
1292 return mpImpl->toMatrixPoint(xView, pnt);
1293 }
1294 
1295 basegfx::B2DPoint EventMultiplexer::toNormalPoint(const 
uno::Reference& xInterface,
1296   const 
basegfx::B2DPoint& pnt)
1297 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3D9QKo_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJioULrH9AQU2iCiNG402wJeZZcQh1N7xjme43VLYkYPWXasLJzIuYufBdIJVb-2Br1DcvDzgIbfrmRrzkL5s1pfgjXoa-2BUctKvPYa6B-2BpspGJyid-2Fs-2F7Mw3m-2FgJcKFnQCE5JXW-2BPV6b1OT-2BUF9xMepMzUeD-2Bx4kAgQmAJ0dOK7Z54m4-3D



New Defects reported by Coverity Scan for LibreOffice

2023-12-08 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
45 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 1 of 1 defect(s)


** CID 1558833:  Uninitialized members  (UNINIT_CTOR)
/configmgr/source/localizedvaluenode.cxx: 38 in 
configmgr::LocalizedValueNode::LocalizedValueNode(int)()



*** CID 1558833:  Uninitialized members  (UNINIT_CTOR)
/configmgr/source/localizedvaluenode.cxx: 38 in 
configmgr::LocalizedValueNode::LocalizedValueNode(int)()
32 LocalizedValueNode::LocalizedValueNode(int layer, css::uno::Any value):
33 Node(layer), value_(std::move(value)), modified_(false)
34 {}
35 
36 LocalizedValueNode::LocalizedValueNode(int layer):
37 Node(layer)
>>> CID 1558833:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "modified_" is not initialized in this 
>>> constructor nor in any functions that it calls.
38 {}
39 
40 rtl::Reference< Node > LocalizedValueNode::clone(bool) const {
41 return new LocalizedValueNode(*this);
42 }
43 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DbAXC_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJizsXYzB20AENTXYWij-2BRRRCQjMemO5KotBmb4V5RRrDTmu2L5En5vuufaVR0Wg9iDCrF3787eEbn9V2-2FdV0pTgqYNI5sWl30h248tLN66sJ6d2DiFSoNZ2j0Sm5Vh6G6kGzESDqJwt6JOFMIQVnA7rFO-2FaYVAWsXaVx0uXxndzqs-3D



New Defects reported by Coverity Scan for LibreOffice

2023-12-07 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
37 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 1 of 1 defect(s)


** CID 1558798:(CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 1031 in OutputDevice::ForceFallbackFont(const 
vcl::Font &)()
/vcl/source/outdev/font.cxx: 1027 in OutputDevice::ForceFallbackFont(const 
vcl::Font &)()



*** CID 1558798:(CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 1031 in OutputDevice::ForceFallbackFont(const 
vcl::Font &)()
1025 vcl::Font aOldFont = GetFont();
1026 SetFont(rFallbackFont);
1027 InitFont();
1028 
1029 mpForcedFallbackInstance = mpFontInstance;
1030 SetFont(aOldFont);
>>> CID 1558798:(CHECKED_RETURN)
>>> Calling "InitFont" without checking return value (as is done elsewhere 
>>> 11 out of 13 times).
1031 InitFont();
1032 
1033 if (mpForcedFallbackInstance)
1034 return true;
1035 
1036 return false;
/vcl/source/outdev/font.cxx: 1027 in OutputDevice::ForceFallbackFont(const 
vcl::Font &)()
1021 }
1022 
1023 bool OutputDevice::ForceFallbackFont(vcl::Font const& rFallbackFont)
1024 {
1025 vcl::Font aOldFont = GetFont();
1026 SetFont(rFallbackFont);
>>> CID 1558798:(CHECKED_RETURN)
>>> Calling "InitFont" without checking return value (as is done elsewhere 
>>> 11 out of 13 times).
1027 InitFont();
1028 
1029 mpForcedFallbackInstance = mpFontInstance;
1030 SetFont(aOldFont);
1031 InitFont();
1032 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3D7a2y_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJimbt-2BNOGakoBgdcaDjKDqx-2B2x5N0kjR5ngWSo5c3f3-2BBLo6ifIEAXvnlQ7W5RUKqO-2BB-2FF6yOqZKhB33P88budkjh10ksHdrKV-2F7bMYoNWKBxSMj9smEk0F4JNiUuXn3a8EATfbr6vMCPf95NbIGDyucec8RvMGh-2FKh8NJFzNcnJU-3D



New Defects reported by Coverity Scan for LibreOffice

2023-12-05 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
49 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 1 of 1 defect(s)


** CID 1558795:  Null pointer dereferences  (FORWARD_NULL)
/svx/source/svdraw/svdoedge.cxx: 1515 in SdrEdgeObj::ImpCalcEdgeTrack(const 
Point &, long, const tools::Rectangle &, const tools::Rectangle &, const Point 
&, long, const tools::Rectangle &, const tools::Rectangle &, unsigned long *, 
SdrEdgeInfoRec *) const()



*** CID 1558795:  Null pointer dereferences  (FORWARD_NULL)
/svx/source/svdraw/svdoedge.cxx: 1515 in SdrEdgeObj::ImpCalcEdgeTrack(const 
Point &, long, const tools::Rectangle &, const tools::Rectangle &, const Point 
&, long, const tools::Rectangle &, const tools::Rectangle &, unsigned long *, 
SdrEdgeInfoRec *) const()
1509 }
1510 }
1511 // make the connector a bezier curve, if appropriate
1512 if (eKind != SdrEdgeKind::Bezier || nPointCount <= 2)
1513 return aXP1;
1514 
>>> CID 1558795:  Null pointer dereferences  (FORWARD_NULL)
>>> Dereferencing null pointer "pInfo".
1515 if (pInfo->m_bUseOOXMLCurve) // Routing method OOXML
1516 {
1517 // The additional points needed are located on the segments of 
the path of the
1518 // corresponding bentConnector as calculated above.
1519 auto SegmentPoint = [&aXP1](const sal_uInt16& nEnd, const 
double& fFactor) {
1520 return Point(



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DPLQ2_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiEJPLiT23hy3EjHjIq7B9VOM2ANPhev2kaF6dBmkQf2Rwu7UXoc6klD761S-2BJnFRxCX5aKoHLytF-2F9rD2197sWC54GcLg1P3WbmUJUoznRsBPgOESh7562tf0FT83bUQeCHqdoTnTISJvYIVLxHVJB86uxLAfLppvO4ykJ9r4Ofw-3D



New Defects reported by Coverity Scan for LibreOffice

2023-11-27 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

423 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 20 of 423 defect(s)


** CID 1557302:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/vcl/source/gdi/pdfwriter_impl.cxx: 10686 in 
vcl::PDFWriterImpl::addRoleMap(rtl::OString, vcl::PDFWriter::StructElement)()



*** CID 1557302:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/vcl/source/gdi/pdfwriter_impl.cxx: 10686 in 
vcl::PDFWriterImpl::addRoleMap(rtl::OString, vcl::PDFWriter::StructElement)()
10680 void PDFWriterImpl::addRoleMap(OString aAlias, 
PDFWriter::StructElement eType)
10681 {
10682 OString aTag = getStructureTag(eType);
10683 // For PDF/UA it's not allowed to map an alias with the same name.
10684 // Not aware of a reason for doing it in any case, so just don't 
do it.
10685 if (aAlias != aTag)
>>> CID 1557302:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aTag" is copied in a call to copy assignment "operator =", when it 
>>> could be moved instead.
10686 m_aRoleMap[aAlias] = aTag;
10687 }
10688 
10689 void PDFWriterImpl::beginStructureElementMCSeq()
10690 {
10691 assert(m_nCurrentStructElement == 0 || 
m_aStructure[m_nCurrentStructElement].m_oType);

** CID 1557301:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svl/source/items/custritm.cxx: 59 in CntUnencodedStringItem::PutValue(const 
com::sun::star::uno::Any &, unsigned char)()



*** CID 1557301:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/svl/source/items/custritm.cxx: 59 in CntUnencodedStringItem::PutValue(const 
com::sun::star::uno::Any &, unsigned char)()
53 bool CntUnencodedStringItem::PutValue(const css::uno::Any& rVal,
54  sal_uInt8)
55 {
56 OUString aTheValue;
57 if (rVal >>= aTheValue)
58 {
>>> CID 1557301:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aTheValue" is copied in a call to copy assignment "operator =", when 
>>> it could be moved instead.
59 m_aValue = aTheValue;
60 return true;
61 }
62 OSL_FAIL("CntUnencodedStringItem::PutValue(): Wrong type");
63 return false;
64 }

** CID 1557300:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/drivers/jdbc/ResultSet.cxx: 119 in 
connectivity::java_sql_ResultSet::queryInterface(const 
com::sun::star::uno::Type &)()



*** CID 1557300:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/connectivity/source/drivers/jdbc/ResultSet.cxx: 119 in 
connectivity::java_sql_ResultSet::queryInterface(const 
com::sun::star::uno::Type &)()
113 SDBThreadAttach::releaseRef();
114 }
115 
116 css::uno::Any SAL_CALL java_sql_ResultSet::queryInterface( const 
css::uno::Type & rType )
117 {
118 css::uno::Any aRet = OPropertySetHelper::queryInterface(rType);
>>> CID 1557300:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "aRet" is copied in call to copy constructor 
>>> "com::sun::star::uno::Any", when it could be moved instead.
119 return aRet.hasValue() ? aRet : 
java_sql_ResultSet_BASE::queryInterface(rType);
120 }
121 
122 css::uno::Sequence< css::uno::Type > SAL_CALL 
java_sql_ResultSet::getTypes(  )
123 {
124 ::cppu::OTypeCollection aTypes( 
cppu::UnoType::get(),

** CID 1557299:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/include/svl/itemset.hxx: 45 in ()



*** CID 1557299:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/include/svl/itemset.hxx: 45 in ()
39 #endif
40 
41 // ItemSet/ItemPool helpers
42 SfxPoolItem const* implCreateItemEntry(SfxItemPool& rPool, SfxPoolItem 
const* pSource, sal_uInt16 nWhich, bool bPassingOwnership);
43 void implCleanupItemEntry(SfxItemPool& rPool, SfxPoolItem const* 
pSource);
44 
>>> CID 1557299:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
>>> Class "SfxPoolItemHolder" may benefit from adding a move assignment 
>>> operator. See other events which show the copy assignment operator being 
>>> applied to rvalues, where a move assignment may be faster.
45 class SAL_WARN_UNUSED SVL_DLLPUBLIC SfxPoolItemHolder
46 {
47 SfxItemPool*m_pPool;
48 const SfxPoolItem*  m_pItem;
49 p

New Defects reported by Coverity Scan for LibreOffice

2023-11-15 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
2 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 1 of 1 defect(s)


** CID 1550112:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/config/viewopt.cxx: 353 in SwViewOption::SwViewOption(const 
SwViewOption&)()



*** CID 1550112:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/config/viewopt.cxx: 353 in SwViewOption::SwViewOption(const 
SwViewOption&)()
347 m_bTest5  = rVOpt.m_bTest5;
348 m_bTest6  = rVOpt.m_bTest6;
349 m_bTest7  = rVOpt.m_bTest7;
350 m_bTest8  = rVOpt.m_bTest8;
351 m_bTest10 = rVOpt.m_bTest10;
352 #endif
>>> CID 1550112:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nIdxEntryLvl" is not initialized in this 
>>> constructor nor in any functions that it calls.
353 }
354 
355 SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
356 {
357 // #114856# Form view
358 m_sThemeName = rVOpt.m_sThemeName;



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3D31GD_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiCdwzNjCBJX-2BQDWM84U6psusb8SF6tI1hapm8erTH4tWc-2BnZtyIE9SH-2BN2nFA79ngDsvJ47b5SPuQjCmlBLaex2fDMjYDfY4h8HL5y8IUGh4ZD2Azse7GNbLu3bY-2Bkthyh2rvGmLIq9dSmR571xqZQ2gpqb9-2BIQWP7mwNq2H36pM-3D



New Defects reported by Coverity Scan for LibreOffice

2023-11-14 Thread scan-admin
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::frameCell".
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

New Defects reported by Coverity Scan for LibreOffice

2023-10-31 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1548365:  Control flow issues  (DEADCODE)
/emfio/source/reader/wmfreader.cxx: 1734 in 
emfio::WmfReader::GetPlaceableBound(tools::Rectangle &, SvStream *)()



*** CID 1548365:  Control flow issues  (DEADCODE)
/emfio/source/reader/wmfreader.cxx: 1734 in 
emfio::WmfReader::GetPlaceableBound(tools::Rectangle &, SvStream *)()
1728 {
1729 break;
1730 }
1731 
1732 switch( nFunction )
1733 {
>>> CID 1548365:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "case ::W_META_EOF:".
1734 case W_META_EOF:
1735 {
1736 return;
1737 }
1738 
1739 case W_META_SETWINDOWORG:



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DAnJ6_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiKGkF6HBw-2FpBOebamfVB-2FC-2FYWEsF-2Bt54fTgKMdEOunqpco7zCbOsMIwmIosn-2FvPdc7k8Js77uLMhzVL1CoyRA5kAPVVRymXtt-2FaIY4DkrjTOeRPcnovTzsN-2Fn6wHm8-2F5zV-2BmqAFkWVKHDzSfdcUIqgvaGssRkj0M-2FEm6WKlwAEuM-3D



New Defects reported by Coverity Scan for LibreOffice

2023-10-21 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
5 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 1 of 1 defect(s)


** CID 1548028:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/sidebar/LayoutMenu.cxx: 534 in sd::sidebar::LayoutMenu::Fill()()



*** CID 1548028:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/sidebar/LayoutMenu.cxx: 534 in sd::sidebar::LayoutMenu::Fill()()
528 pInfo = standard;
529 }
530 
531 Clear();
532 for (size_t i = 0; i < pInfo.size(); i++)
533 {
>>> CID 1548028:  Null pointer dereferences  (FORWARD_NULL)
>>> Dereferencing null pointer "pInfo[i]".
534 if ((WritingMode_TB_RL != pInfo[i].meWritingMode) || bVertical)
535 {
536 Image aImg(OUString::Concat("private:graphicrepository/") + 
pInfo[i].msBmpResId);
537 
538 if (bRightToLeft && (WritingMode_TB_RL != 
pInfo[i].meWritingMode))
539 { // FIXME: avoid interpolating RTL layouts.



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3D_ciS_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiSHhe9Wg-2FPnsc7UhTzovCpfyVTuEnUpg25la-2Bm-2F4-2B9DrIs-2FJPt-2FC3Ee8HW4Im7iDDW9EgozI-2BdJbG6eN-2FFL421Gikc-2BxPdL77TBu6VCN7GYFdXnEoldYiphhV-2BhPY0TExJxSeDLpFD3UpFp7gi2zy6Vo4RqO2cRmSAFIMiu-2FsPOg-3D



New Defects reported by Coverity Scan for LibreOffice

2023-10-14 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1547215:  Parse warnings  (PARSE_ERROR)
/usr/include/c++/12/bits/stl_pair.h: 278 in ()



*** CID 1547215:  Parse warnings  (PARSE_ERROR)
/usr/include/c++/12/bits/stl_pair.h: 278 in ()
272   : first(__x), second(__y)
273   { }
274 
275   /// Constructor accepting two values of arbitrary types
276   template
277 requires (_S_constructible<_U1, _U2>())
>>> CID 1547215:  Parse warnings  (PARSE_ERROR)
>>> template constraint not satisfied
278 constexpr explicit(!_S_convertible<_U1, _U2>())
279 pair(_U1&& __x, _U2&& __y)
280 noexcept(_S_nothrow_constructible<_U1, _U2>())
281 : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y))
282 { }
283 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNnPiSHxWPOELPnIxzXoBNaw-3DqnjQ_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiwFnsfJj-2FHuShNrfSBb0tnrOit2lhy7BGVokoMZtqEAdEUUNyvd8VKIN1MWVmGb5tDsnzK1dLBQDoJ6siWL5QMKX1J1ieqgivWWl2fIg6ZswKkOI-2BeTWuTLkkdwNDm-2FflOPpm8gwlZq8EcAMZ-2BBHR8WVguBYxwtd-2BAGutUhj2M5Q-3D



New Defects reported by Coverity Scan for LibreOffice

2023-10-08 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 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 1 of 1 defect(s)


** CID 1547102:  Uninitialized members  (UNINIT_CTOR)
/editeng/source/accessibility/AccessibleStaticTextBase.cxx: 185 in 
accessibility::AccessibleStaticTextBase_Impl::AccessibleStaticTextBase_Impl()()



*** CID 1547102:  Uninitialized members  (UNINIT_CTOR)
/editeng/source/accessibility/AccessibleStaticTextBase.cxx: 185 in 
accessibility::AccessibleStaticTextBase_Impl::AccessibleStaticTextBase_Impl()()
179 AccessibleStaticTextBase_Impl::AccessibleStaticTextBase_Impl() :
180 mxTextParagraph( new AccessibleEditableTextPara(nullptr) )
181 {
182 
183 // TODO: this is still somewhat of a hack, all the more since
184 // now the maTextParagraph has an empty parent reference set
>>> CID 1547102:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mpThis" is not initialized in this constructor 
>>> nor in any functions that it calls.
185 }
186 
187 void AccessibleStaticTextBase_Impl::SetEditSource( std::unique_ptr< 
SvxEditSource > && pEditSource )
188 {
189 
190 maEditSource.SetEditSource( std::move(pEditSource) );



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DDTPf_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJivEByo8HRdx3MAnZB6PPji3NAy3w5WG89orNHicr9lrmbtnShChkGi1PUnfg3A03O58M7XJDHgxPvLsGiAV2qBwwRdy7op9e5OPLAVTFKKXVrsusE-2FGUi7Dv-2F0-2BqbFzmu1DjZGRtwsr964nB0krf5KkdxCdAi-2FYVW0eHy4A6pIHk-3D



New Defects reported by Coverity Scan for LibreOffice

2023-10-07 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 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 1 of 1 defect(s)


** CID 1547086:  Control flow issues  (DEADCODE)
/svx/source/form/fmundo.cxx: 326 in FmXUndoEnvironment::Notify(SfxBroadcaster 
&, const SfxHint &)()



*** CID 1547086:  Control flow issues  (DEADCODE)
/svx/source/form/fmundo.cxx: 326 in FmXUndoEnvironment::Notify(SfxBroadcaster 
&, const SfxHint &)()
320 break;
321 default: break;
322 }
323 }
324 else if (rHint.GetId() == SfxHintId::ThisIsAnSfxEventHint)
325 {
>>> CID 1547086:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "switch (static_cast(rHint).GetEventId())
327 {
328 case SfxEventHintId::CreateDoc:
329 case SfxEventHintId::OpenDoc:
330 ModeChanged();
331 break;



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DFJqn_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi6683qbSYhY5UBDD4eu64QOTLnEPAUXodBdXiBzlOfOpTx3ZOkJan5Bsf9ZsqIGUszTDDr-2FYyjb8nFcDDjLX7qQ0zQ7N9H-2BWaqlhPwKmhbEc1HmpQYvH-2FKwOoOTh9JRN7LsPIHpGdeJRsnH25hbkiMWUjZmgO4Zh7i5eHmXxbInM-3D



New Defects reported by Coverity Scan for LibreOffice

2023-10-06 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
3 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 1 of 1 defect(s)


** CID 1547076:  Uninitialized members  (UNINIT_CTOR)
/include/comphelper/errcode.hxx: 184 in ErrCodeMsg::ErrCodeMsg()()



*** CID 1547076:  Uninitialized members  (UNINIT_CTOR)
/include/comphelper/errcode.hxx: 184 in ErrCodeMsg::ErrCodeMsg()()
178 /** Wrap up an ErrCode and an explanation and the source location where 
the error was created,
179 helps with debugging when finding the source of a problem.
180 */
181 class SAL_WARN_UNUSED ErrCodeMsg
182 {
183 public:
>>> CID 1547076:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mnDialogMask" is not initialized in this 
>>> constructor nor in any functions that it calls.
184 ErrCodeMsg() : mnCode(0) {}
185 #ifdef LIBO_ERRMSG_USE_SOURCE_LOCATION
186 ErrCodeMsg(ErrCode code, const OUString& arg, 
std::experimental::source_location loc = 
std::experimental::source_location::current())
187 : mnCode(code), maArg1(arg),  mnDialogMask(DialogMask::NONE), 
moLoc(loc) {}
188 ErrCodeMsg(ErrCode code, const OUString& arg1, const OUString& 
arg2, std::experimental::source_location loc = 
std::experimental::source_location::current())
189 : mnCode(code), maArg1(arg1), maArg2(arg2), 
mnDialogMask(DialogMask::NONE), moLoc(loc) {}



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3Dbyz0_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiAThq93V3DdanW3Zjvbp7SNjrJlHKyK-2BrYAPmLKgA3Rrmgs8LcOxNKmCpKBjVxAboKknTzl3n-2BU7xjhM6W-2BTR-2BufwymB4BncRN5CRPqRg1r-2BPU0SeCwM9Z1AahvJd9CenpdXTkrR5BP6Y8fABE150vwsNtKxbgB-2F22NugLxC75iI-3D



New Defects reported by Coverity Scan for LibreOffice

2023-10-01 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
4 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 1 of 1 defect(s)


** CID 1547033:(FORWARD_NULL)



*** CID 1547033:(FORWARD_NULL)
/filter/source/pdf/impdialog.cxx: 942 in 
ImpPDFTabGeneralPage::TogglePDFVersionOrUniversalAccessibilityHandle(weld::Toggleable
 &)()
936 
937 // set the security page status (and its controls as well)
938 ImpPDFTabSecurityPage* pSecPage = mpParent ? 
mpParent->getSecurityPage() : nullptr;
939 if (pSecPage)
940 pSecPage->ImplPDFASecurityControl(!bIsPDFA);
941 
>>> CID 1547033:(FORWARD_NULL)
>>> Passing null pointer "this->mpParent->maConfigItem" to "IsReadOnly", 
>>> which dereferences it.
942 mxCbTaggedPDF->set_sensitive(
943 !bIsPDFA && !bIsPDFUA && 
!mpParent->maConfigItem.IsReadOnly("UseTaggedPDF"));
944 mxRbPDFAVersion->set_sensitive(
945 bIsPDFA && 
!mpParent->maConfigItem.IsReadOnly("SelectPdfVersion"));
946 
947 if (bIsPDFA || bIsPDFUA)
/filter/source/pdf/impdialog.cxx: 944 in 
ImpPDFTabGeneralPage::TogglePDFVersionOrUniversalAccessibilityHandle(weld::Toggleable
 &)()
938 ImpPDFTabSecurityPage* pSecPage = mpParent ? 
mpParent->getSecurityPage() : nullptr;
939 if (pSecPage)
940 pSecPage->ImplPDFASecurityControl(!bIsPDFA);
941 
942 mxCbTaggedPDF->set_sensitive(
943 !bIsPDFA && !bIsPDFUA && 
!mpParent->maConfigItem.IsReadOnly("UseTaggedPDF"));
>>> CID 1547033:(FORWARD_NULL)
>>> Passing null pointer "this->mpParent->maConfigItem" to "IsReadOnly", 
>>> which dereferences it.
944 mxRbPDFAVersion->set_sensitive(
945 bIsPDFA && 
!mpParent->maConfigItem.IsReadOnly("SelectPdfVersion"));
946 
947 if (bIsPDFA || bIsPDFUA)
948 {
949 // store the users selection of subordinate controls and set 
required PDF/A values
/filter/source/pdf/impdialog.cxx: 993 in 
ImpPDFTabGeneralPage::TogglePDFVersionOrUniversalAccessibilityHandle(weld::Toggleable
 &)()
987 }
988 else if (mpParent)
989 {
990 
mxCbExportBookmarks->set_active(mpParent->mbExportBookmarksUserSelection);
991 
mxCbUseReferenceXObject->set_active(mpParent->mbUseReferenceXObjectUserSelection);
992 }
>>> CID 1547033:(FORWARD_NULL)
>>> Passing null pointer "this->mpParent->maConfigItem" to "IsReadOnly", 
>>> which dereferences it.
993 mxCbExportBookmarks->set_sensitive(
994 !bIsPDFUA && 
!mpParent->maConfigItem.IsReadOnly("ExportBookmarks"));
995 mxCbUseReferenceXObject->set_sensitive(!bIsPDFUA);
996 
997 ImpPDFTabOpnFtrPage *const pOpenPage(mpParent ? 
mpParent->getOpenPage() : nullptr);
998 if (pOpenPage)



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DoQbI_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiJYghQPBp2QpoePK0lIKEfF9lRNOVIs9XkB-2FVguAgcsgc2K0MOORfF0ji4YfBwPiUyGlVuyJAkN0qCXhLgGjRH1Xzn-2FIeZII-2Bs1rPq2k6fTr4CuvnVvZgZLaRGHh-2FFkgQ3eXB3OojPT4c1-2BOt-2FHt358YyVx5HHTQg1HYoPijVIto-3D



New Defects reported by Coverity Scan for LibreOffice

2023-09-30 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
10 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 1 of 1 defect(s)


** CID 1546839:  Control flow issues  (DEADCODE)
/sw/source/core/attr/swatrset.cxx: 325 in SwAttrSet::Intersect_BC(const 
SfxItemSet &, SwAttrSet*, SwAttrSet*)()



*** CID 1546839:  Control flow issues  (DEADCODE)
/sw/source/core/attr/swatrset.cxx: 325 in SwAttrSet::Intersect_BC(const 
SfxItemSet &, SwAttrSet*, SwAttrSet*)()
319 m_pNewSet = pNew;
320 m_pOldSet = pOld;
321 setCallback(m_aCallbackHolder);
322 SfxItemSet::Intersect( rSet );
323 clearCallback();
324 m_pOldSet = m_pNewSet = nullptr;
>>> CID 1546839:  Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "0" inside this statement: 
>>> "return pNew ? pNew->Count()...".
325 return pNew ? pNew->Count() : ( pOld ? pOld->Count() : 0 );
326 }
327 
328 /** special treatment for some attributes
329 
330 Set the Modify pointer (old pDefinedIn) for the following 
attributes:



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DSeD1_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi0ajyWbuTOgdNTUHp45uBVmkRlo9Z-2FSOZfC2LbI5gXYAl3Xpy5oEWnt98Zamr4SZMHxLD4Po1qSkE9P7AHy3PBIJqBBsfZ4TckT-2FbfssbGIU1LmRfCVyAJLmgk7qjQ9pVXFC37R4EbRRNMDr3kaAMTtZ1xqm5ySJcAossY1lkwXs-3D



New Defects reported by Coverity Scan for LibreOffice

2023-09-28 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

8 new defect(s) introduced to LibreOffice found with Coverity Scan.
1436 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 8 of 8 defect(s)


** CID 1546834:  Error handling issues  (CHECKED_RETURN)
/pyuno/source/module/pyuno_runtime.cxx: 244 in pyuno::readLoggingConfig(int *, 
_IO_FILE **)()



*** CID 1546834:  Error handling issues  (CHECKED_RETURN)
/pyuno/source/module/pyuno_runtime.cxx: 244 in pyuno::readLoggingConfig(int *, 
_IO_FILE **)()
238 else if ( str == "stderr" )
239 *ppFile = stderr;
240 else
241 {
242 oslProcessInfo data;
243 data.Size = sizeof( data );
>>> CID 1546834:  Error handling issues  (CHECKED_RETURN)
>>> Calling "osl_getProcessInfo" without checking return value (as is done 
>>> elsewhere 6 out of 7 times).
244 osl_getProcessInfo(
245 nullptr , osl_Process_IDENTIFIER , &data );
246 osl_getSystemPathFromFileURL( str.pData, &str.pData);
247 OString o = OUStringToOString( str, osl_getThreadTextEncoding() 
);
248 o += ".";
249 o += OString::number( data.Ident );

** CID 1546833:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unoframe.cxx: 2997 in SwXFrame::attachToRange(const 
com::sun::star::uno::Reference &, const SwPaM 
*)()



*** CID 1546833:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/unocore/unoframe.cxx: 2997 in SwXFrame::attachToRange(const 
com::sun::star::uno::Reference &, const SwPaM 
*)()
2991 if(!bSizeFound)
2992 {
2993 //TODO/LATER: how do I transport it to the OLENode?
2994 sal_Int64 nAspect = m_nDrawAspect;
2995 
2996 // TODO/LEAN: VisualArea still needs running state
>>> CID 1546833:  Error handling issues  (CHECKED_RETURN)
>>> Calling "TryRunningState" without checking return value (as is done 
>>> elsewhere 33 out of 39 times).
2997 svt::EmbeddedObjectRef::TryRunningState( xIPObj );
2998 
2999 // set parent to get correct VisArea(in case of 
object needing parent printer)
3000 uno::Reference < container::XChild > xChild( 
xIPObj, uno::UNO_QUERY );
3001 if ( xChild.is() )
3002 xChild->setParent( 
pDoc->GetDocShell()->GetModel() );

** CID 1546832:  Sigma  (SIGMA.weak_hash_core_java)
/workdir/UnpackedTarball/java_websocket/src/main/java/org/java_websocket/drafts/Draft_6455.java:
 837 in 
org.java_websocket.drafts.Draft_6455::generateFinalKey(org.java_websocket.drafts.Draft_6455,
 String)()



*** CID 1546832:  Sigma  (SIGMA.weak_hash_core_java)
/workdir/UnpackedTarball/java_websocket/src/main/java/org/java_websocket/drafts/Draft_6455.java:
 837 in 
org.java_websocket.drafts.Draft_6455::generateFinalKey(org.java_websocket.drafts.Draft_6455,
 String)()
831*/
832   private String generateFinalKey(String in) {
833 String seckey = in.trim();
834 String acc = seckey + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
835 MessageDigest sh1;
836 try {
>>> CID 1546832:  Sigma  (SIGMA.weak_hash_core_java)
>>> This application uses a weak algorithm to create a `MessageDigest`, 
>>> which may lead to collision attacks.
837   sh1 = MessageDigest.getInstance("SHA1");
838 } catch (NoSuchAlgorithmException e) {
839   throw new IllegalStateException(e);
840 }
841 return Base64.encodeBytes(sh1.digest(acc.getBytes()));
842   }

** CID 1546831:  Null pointer dereferences  (FORWARD_NULL)
/sfx2/source/view/lokcharthelper.cxx: 178 in LokChartHelper::HitAny(const Point 
&, bool)()



*** CID 1546831:  Null pointer dereferences  (FORWARD_NULL)
/sfx2/source/view/lokcharthelper.cxx: 178 in LokChartHelper::HitAny(const Point 
&, bool)()
172 {
173 SfxViewShell* pCurView = SfxViewShell::Current();
174 int nPartForCurView = pCurView ? pCurView->getPart() : -1;
175 SfxViewShell* pViewShell = SfxViewShell::GetFirst();
176 while (pViewShell)
177 {
>>> CID 1546831:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pCurView" to "GetDocId", which dereferences it. 
>>> (The dereference happens because this is 

  1   2   3   4   5   6   7   8   >