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.
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 9 of 9 defect(s)
** CID 1454634: Error handling issues (CHECKED_RETURN)
/vcl/source/app/salvtables.cxx: 1602 in
SalInstanceAssistant::set_current_page(int)()
________________________________________________________________________________________________________
*** CID 1454634: Error handling issues (CHECKED_RETURN)
/vcl/source/app/salvtables.cxx: 1602 in
SalInstanceAssistant::set_current_page(int)()
1596 if (aPageSize.Height() > aFinalSize.Height())
1597 aFinalSize.setHeight(aPageSize.Height());
1598 }
1599 m_xWizard->SetPageSizePixel(aFinalSize);
1600 }
1601
>>> CID 1454634: Error handling issues (CHECKED_RETURN)
>>> Calling "ShowPage" without checking return value (as is done elsewhere
>>> 4 out of 5 times).
1602 m_xWizard->ShowPage(m_aIds[nPage]);
1603 enable_notify_events();
1604 }
1605
1606 virtual void set_current_page(const OString& rIdent) override
1607 {
** CID 1454633: Error handling issues (UNCAUGHT_EXCEPT)
/vcl/unx/generic/gdi/salgdi.cxx: 92 in X11SalGraphics::~X11SalGraphics()()
________________________________________________________________________________________________________
*** CID 1454633: Error handling issues (UNCAUGHT_EXCEPT)
/vcl/unx/generic/gdi/salgdi.cxx: 92 in X11SalGraphics::~X11SalGraphics()()
86 mxTextRenderImpl.reset(new X11CairoTextRender(*this));
87 mxImpl.reset(new X11SalGraphicsImpl(*this));
88 }
89
90 }
91
>>> CID 1454633: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown
>>> but the throw list "noexcept" doesn't allow it to be thrown. This will
>>> cause a call to unexpected() which usually calls terminate().
92 X11SalGraphics::~X11SalGraphics()
93 {
94 DeInit();
95 ReleaseFonts();
96 freeResources();
97 }
** CID 1454632: Error handling issues (UNCAUGHT_EXCEPT)
/vcl/unx/generic/app/saldisp.cxx: 294 in SalDisplay::~SalDisplay()()
________________________________________________________________________________________________________
*** CID 1454632: Error handling issues (UNCAUGHT_EXCEPT)
/vcl/unx/generic/app/saldisp.cxx: 294 in SalDisplay::~SalDisplay()()
288 SAL_WARN_IF( pData->GetDisplay(), "vcl", "Second SalDisplay
created !!!" );
289 pData->SetDisplay( this );
290
291 m_nXDefaultScreen = SalX11Screen( DefaultScreen( pDisp_ ) );
292 }
293
>>> CID 1454632: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown
>>> but the throw list "noexcept" doesn't allow it to be thrown. This will
>>> cause a call to unexpected() which usually calls terminate().
294 SalDisplay::~SalDisplay()
295 {
296 #if OSL_DEBUG_LEVEL > 1
297 fprintf( stderr, "SalDisplay::~SalDisplay()\n" );
298 #endif
299 if( pDisp_ )
** CID 1454631: Control flow issues (DEADCODE)
/basegfx/source/tools/systemdependentdata.cxx: 112 in
basegfx::SystemDependentData::calculateCombinedHoldCyclesInSeconds() const()
________________________________________________________________________________________________________
*** CID 1454631: Control flow issues (DEADCODE)
/basegfx/source/tools/systemdependentdata.cxx: 112 in
basegfx::SystemDependentData::calculateCombinedHoldCyclesInSeconds() const()
106 {
107 nResult = nSeconds;
108 }
109 }
110
111 // set locally (once, on-demand created, non-zero)
>>> CID 1454631: Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "1U" inside this statement:
>>> "const_cast<basegfx::SystemD...".
112 const_cast<SystemDependentData*>(this)->mnCalculatedCycles
= nResult < 1 ? 1 : nResult;
113 }
114
115 return mnCalculatedCycles;
116 }
117
** CID 1454630: Uninitialized members (UNINIT_CTOR)
/sc/source/core/data/dpcache.cxx: 175 in <unnamed>::Bucket::Bucket()()
________________________________________________________________________________________________________
*** CID 1454630: Uninitialized members (UNINIT_CTOR)
/sc/source/core/data/dpcache.cxx: 175 in <unnamed>::Bucket::Bucket()()
169
170 struct Bucket
171 {
172 ScDPItemData maValue;
173 SCROW mnOrderIndex;
174 SCROW mnDataIndex;
>>> CID 1454630: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "mnDataIndex" is not initialized in this
>>> constructor nor in any functions that it calls.
175 Bucket() {}
176 Bucket(const ScDPItemData& rValue, SCROW nData) :
177 maValue(rValue), mnOrderIndex(0), mnDataIndex(nData) {}
178 };
179
180 #if DEBUG_PIVOT_TABLE
** CID 1454629: (SWAPPED_ARGUMENTS)
________________________________________________________________________________________________________
*** CID 1454629: (SWAPPED_ARGUMENTS)
/vcl/source/window/printdlg.cxx: 636 in
vcl::PrintDialog::PrintDialog(weld::Window *, const
std::shared_ptr<vcl::PrinterController> &)()
630 maNupLandscapeSize = aNupSize;
631 maNupPortraitSize = Size( aNupSize.Height(), aNupSize.Width() );
632 }
633 else
634 {
635 maNupPortraitSize = aNupSize;
>>> CID 1454629: (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the constructor for "Size" do not match
>>> the ordering of the parameters:
* "aNupSize.Height()" is passed to "nWidth"
* "aNupSize.Width()" is passed to "nHeight"
636 maNupLandscapeSize = Size( aNupSize.Height(), aNupSize.Width()
);
637 }
638
639 initFromMultiPageSetup( maPController->getMultipage() );
640
641 // setup optional UI options set by application
/vcl/source/window/printdlg.cxx: 631 in
vcl::PrintDialog::PrintDialog(weld::Window *, const
std::shared_ptr<vcl::PrinterController> &)()
625 // setup sizes for N-Up
626 Size aNupSize( maPController->getPrinter()->PixelToLogic(
627
maPController->getPrinter()->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM
) ) );
628 if( maPController->getPrinter()->GetOrientation() ==
Orientation::Landscape )
629 {
630 maNupLandscapeSize = aNupSize;
>>> CID 1454629: (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the constructor for "Size" do not match
>>> the ordering of the parameters:
* "aNupSize.Height()" is passed to "nWidth"
* "aNupSize.Width()" is passed to "nHeight"
631 maNupPortraitSize = Size( aNupSize.Height(), aNupSize.Width() );
632 }
633 else
634 {
635 maNupPortraitSize = aNupSize;
636 maNupLandscapeSize = Size( aNupSize.Height(), aNupSize.Width()
);
** CID 1454628: Error handling issues (UNCAUGHT_EXCEPT)
/vcl/unx/generic/app/saldisp.cxx: 430 in SalX11Display::~SalX11Display()()
________________________________________________________________________________________________________
*** CID 1454628: Error handling issues (UNCAUGHT_EXCEPT)
/vcl/unx/generic/app/saldisp.cxx: 430 in SalX11Display::~SalX11Display()()
424 this,
425 reinterpret_cast<YieldFunc>(DisplayHasEvent),
426 reinterpret_cast<YieldFunc>(DisplayQueue),
427 reinterpret_cast<YieldFunc>(DisplayYield) );
428 }
429
>>> CID 1454628: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown
>>> but the throw list "noexcept" doesn't allow it to be thrown. This will
>>> cause a call to unexpected() which usually calls terminate().
430 SalX11Display::~SalX11Display()
431 {
432 #if OSL_DEBUG_LEVEL > 1
433 fprintf( stderr, "SalX11Display::~SalX11Display()\n" );
434 #endif
435 if( pDisp_ )
** CID 1454627: Null pointer dereferences (NULL_RETURNS)
________________________________________________________________________________________________________
*** CID 1454627: Null pointer dereferences (NULL_RETURNS)
/sd/source/ui/func/fupage.cxx: 375 in sd::FuPage::ExecuteDialog(weld::Window *,
const SfxRequest &)()
369 }
370 }
371
372 // if the background for this page was set to invisible,
the background-object has to be deleted, too.
373 const XFillStyleItem* pTempFillStyleItem =
pTempSet->GetItem<XFillStyleItem>(XATTR_FILLSTYLE);
374 assert(pTempFillStyleItem);
>>> CID 1454627: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr"
>>> "aMergedAttr.GetItem(TypedWhichId<XFillStyleItem>(1014), true)" when
>>> calling "GetValue".
375 if( ( pTempFillStyleItem->GetValue() ==
drawing::FillStyle_NONE ) ||
376 ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) ==
SfxItemState::DEFAULT ) &&
377 ( aMergedAttr.GetItem<XFillStyleItem>(
XATTR_FILLSTYLE )->GetValue() == drawing::FillStyle_NONE ) ) )
378 mbPageBckgrdDeleted = true;
379
380 if( !mbMasterPage && bChanges && mbPageBckgrdDeleted )
** CID 1454626: Uninitialized members (UNINIT_CTOR)
/oox/source/export/chartexport.cxx: 430 in
oox::drawingml::ChartExport::ChartExport(int,
std::shared_ptr<sax_fastparser::FastSerializerHelper>, const
com::sun::star::uno::Reference<com::sun::star::frame::XModel> &,
oox::core::XmlFilterBase *, oox::drawingml::DocumentType)()
________________________________________________________________________________________________________
*** CID 1454626: Uninitialized members (UNINIT_CTOR)
/oox/source/export/chartexport.cxx: 430 in
oox::drawingml::ChartExport::ChartExport(int,
std::shared_ptr<sax_fastparser::FastSerializerHelper>, const
com::sun::star::uno::Reference<com::sun::star::frame::XModel> &,
oox::core::XmlFilterBase *, oox::drawingml::DocumentType)()
424 , mbHasCategoryLabels( false )
425 , mbHasZAxis( false )
426 , mbIs3DChart( false )
427 , mbStacked(false)
428 , mbPercent(false)
429 {
>>> CID 1454626: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "mbIsCategoryPositionShifted" is not
>>> initialized in this constructor nor in any functions that it calls.
430 }
431
432 void ChartExport::SetURLTranslator(const
std::shared_ptr<URLTransformer>& pTransformer)
433 {
434 mpURLTransformer = pTransformer;
435 }
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyca5vgMaVXPikPZuKQjqKtg5XXvQ-2B12L5djHpDo3EowTRdfKoHybPuBLe-2BQsq3codgN1oNdPNu2MGbLl898z2gRUWiZMlyp-2BzZI5cpgyshsWhet8QTR0hAZy4OJfskjnUfdsv65sWQNudIb-2FIqcXA-2BJcvU6VjGZRZtBVKhq8wzEE-3D
_______________________________________________
LibreOffice mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice