New Defects reported by Coverity Scan for LibreOffice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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<com::sun::star::drawing::XShapes> &, bool, bool, basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const std::shared_ptr<oox::drawingml::Shape> &)()
/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<com::sun::star::drawing::XShapes> &, bool, bool, basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const std::shared_ptr<oox::drawingml::Shape> &)()


________________________________________________________________________________________________________
*** 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<com::sun::star::drawing::XShapes> &, bool, bool, basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const std::shared_ptr<oox::drawingml::Shape> &)()
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<com::sun::star::drawing::XShapes> &, bool, bool, basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const std::shared_ptr<oox::drawingml::Shape> &)()
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<sal_Int32> 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<GfxLink>(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<com::sun::star::drawing::XShapes> &, bool, bool, basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const std::shared_ptr<oox::drawingml::Shape> &)()


________________________________________________________________________________________________________
*** 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<com::sun::star::drawing::XShapes> &, bool, bool, basegfx::B2DHomMatrix &, const oox::drawingml::FillProperties &, const std::shared_ptr<oox::drawingml::Shape> &)()
1213                         aPoint.setY(aPoint.getY() + 1);
1214                 }
1215     
1216                 pPoints[i] = awt::Point(static_cast<sal_Int32>(aPoint.getX()), static_cast<sal_Int32>(aPoint.getY()));
1217             }
1218             uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( 1 );
>>>     CID 1609650:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aPointSequence" is copied in a call to copy assignment "operator =", when it could be moved instead.
1219             aPolyPolySequence.getArray()[ 0 ] = aPointSequence;
1220     
1221             maShapeProperties.setProperty(PROP_PolyPolygon, aPolyPolySequence);
1222         }
1223         if ( aServiceName == "com.sun.star.drawing.ConnectorShape" )
1224         {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3Da8u6_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtfXNO5YbPL4IyfjxBAiwBq-2BTDzUIffhgfH2tC24UL-2F6fGgppmHY-2FhGgk-2BqoVilHQZLBWJx3aNv4FPHun78wq3fig5BErkYeA2G2jw3c2v0spoa-2BiFXMBGDSuNQGUPksXLpuEcJA-2F4jIECE7zZse0Ghmcy3j0JWoywIOHJjaouw2GbVg5zQTnSMZkDMqlR-2FnRb




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux