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<oox::drawingml::Shape3DProperties>,
 const int &, double &, double &, double &)()
/oox/source/drawingml/scene3dhelper.cxx: 250 in 
oox::Scene3DHelper::getAPIAnglesFrom3DProperties(std::shared_ptr<oox::drawingml::Shape3DProperties>,
 const int &, double &, double &, double &)()
/oox/source/drawingml/scene3dhelper.cxx: 249 in 
oox::Scene3DHelper::getAPIAnglesFrom3DProperties(std::shared_ptr<oox::drawingml::Shape3DProperties>,
 const int &, double &, double &, double &)()


________________________________________________________________________________________________________
*** CID 1592381:    (OVERRUN)
/oox/source/drawingml/scene3dhelper.cxx: 248 in 
oox::Scene3DHelper::getAPIAnglesFrom3DProperties(std::shared_ptr<oox::drawingml::Shape3DProperties>,
 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/60000 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<oox::drawingml::Shape3DProperties>,
 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/60000 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<oox::drawingml::Shape3DProperties>,
 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/60000 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 &)()


________________________________________________________________________________________________________
*** CID 1592380:  Incorrect expression  (COPY_PASTE_ERROR)
/sd/source/ui/slideshow/slideshowimpl.cxx: 3439 in 
sd::SlideshowImpl::Notify(SfxBroadcaster &, const SfxHint &)()
3433         const SdrHintKind eHintKind(rSdrHint.GetKind());
3434     
3435         switch (eHintKind)
3436         {
3437             case SdrHintKind::ObjectInserted:
3438             {
>>>     CID 1592380:  Incorrect expression  (COPY_PASTE_ERROR)
>>>     "mnEventObjectChange" in "this->mnEventObjectChange" looks like a 
>>> copy-paste error.
3439                 if (nullptr != mnEventObjectChange)
3440                     // avoid multiple events
3441                     return;
3442     
3443                 if (!isCurrentSlideInvolved(rSdrHint))
3444                     // nothing to do when current slide is not involved

** CID 1592379:  Control flow issues  (DEADCODE)
/sc/source/core/tool/interpr1.cxx: 7720 in 
ScInterpreter::CalculateLookup(bool)()


________________________________________________________________________________________________________
*** CID 1592379:  Control flow issues  (DEADCODE)
/sc/source/core/tool/interpr1.cxx: 7720 in 
ScInterpreter::CalculateLookup(bool)()
7714                 }
7715                 nRow = nZIndex;
7716             }
7717             else
7718             {
7719                 ScAddress aResultPos( nCol1, nRow1, nTab1);
>>>     CID 1592379:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach the expression "287" inside this statement: 
>>> "bFound = this->LookupQueryW...".
7720                 bFound = LookupQueryWithCache( aResultPos, aParam, 
refData, 0,
7721                              ( bHLookup ? SC_OPCODE_H_LOOKUP : 
SC_OPCODE_V_LOOKUP ) );
7722                 nRow = aResultPos.Row();
7723                 nCol = nSpIndex;
7724             }
7725     

** CID 1592378:  Control flow issues  (DEADCODE)
/oox/source/export/chartexport.cxx: 1723 in 
oox::drawingml::ChartExport::exportPlotArea(const 
com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> &)()


________________________________________________________________________________________________________
*** CID 1592378:  Control flow issues  (DEADCODE)
/oox/source/export/chartexport.cxx: 1723 in 
oox::drawingml::ChartExport::exportPlotArea(const 
com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> &)()
1717                                         case chart2::PieChartSubType_PIE:
1718                                             sSubType = "pie";
1719                                             break;
1720                                         case chart2::PieChartSubType_BAR:
1721                                             sSubType = "bar";
1722                                             break;
>>>     CID 1592378:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "case (com::sun::star::chart...".
1723                                         case chart2::PieChartSubType_NONE:
1724                                         default:
1725                                             assert(false);
1726                                     }
1727     
1728                                     exportOfPieChart(xChartType, sSubType);

** CID 1592377:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/filter/ww8/writerhelper.cxx: 834 in 
sw::util::RedlineStack::~RedlineStack()()


________________________________________________________________________________________________________
*** CID 1592377:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/filter/ww8/writerhelper.cxx: 834 in 
sw::util::RedlineStack::~RedlineStack()()
828                 if (pOne->m_aStamp == pTwo->m_aStamp)
829                     return (pOne->m_eType == RedlineType::Insert && 
pTwo->m_eType != RedlineType::Insert);
830                 else
831                     return (pOne->m_aStamp < pTwo->m_aStamp);
832             }
833     
>>>     CID 1592377:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the exception specification "/*implicit*/noexcept" doesn't allow it to 
>>> be thrown. This will result in a call to terminate().
834             RedlineStack::~RedlineStack()
835             {
836                 std::stable_sort(maStack.begin(), maStack.end(), 
CompareRedlines());
837                 std::for_each(maStack.begin(), maStack.end(), 
SetInDocAndDelete(mrDoc));
838             }
839     

** CID 1592376:  Uninitialized members  (UNINIT_CTOR)
/sd/source/ui/slideshow/slideshowimpl.cxx: 259 in 
sd::AnimationSlideController::AnimationSlideController(const 
com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> &, 
sd::AnimationSlideController::Mode)()


________________________________________________________________________________________________________
*** CID 1592376:  Uninitialized members  (UNINIT_CTOR)
/sd/source/ui/slideshow/slideshowimpl.cxx: 259 in 
sd::AnimationSlideController::AnimationSlideController(const 
com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> &, 
sd::AnimationSlideController::Mode)()
253     ,   mnCurrentSlideIndex(0)
254     ,   mnHiddenSlideNumber( -1 )
255     ,   mxSlides( xSlides )
256     {
257         if( mxSlides.is() )
258             mnSlideCount = xSlides->getCount();
>>>     CID 1592376:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "meMode2" is not initialized in this 
>>> constructor nor in any functions that it calls.
259     }
260     
261     sal_Int32 AnimationSlideController::getStartSlideIndex() const
262     {
263         if( mnStartSlideNumber >= 0 )
264         {

** CID 1592375:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController.cxx: 1400 in 
chart::ChartController::executeDispatch_SourceData()()


________________________________________________________________________________________________________
*** CID 1592375:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/chart2/source/controller/main/ChartController.cxx: 1400 in 
chart::ChartController::executeDispatch_SourceData()()
1394             }
1395         }
1396         auto aUndoGuard = 
std::make_shared<UndoLiveUpdateGuard>(SchResId(STR_ACTION_EDIT_DATA_RANGES),
1397                                                                 
m_xUndoManager);
1398         SolarMutexGuard aSolarGuard;
1399         auto aDlg = std::make_shared<DataSourceDialog>(GetChartFrame(), 
xChartDoc);
>>>     CID 1592375:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aUndoGuard" is copied in call to copy constructor 
>>> "std::shared_ptr<chart::UndoLiveUpdateGuard>", when it could be moved 
>>> instead.
1400         weld::DialogController::runAsync(aDlg, [this, aUndoGuard](int 
nResult) {
1401             if (nResult == RET_OK)
1402             {
1403                 impl_adaptDataSeriesAutoResize();
1404                 aUndoGuard->commit();
1405             }


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

Reply via email to