New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Wed Mar 15 12:26:41 UTC 2023
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
31 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 20 of 31 defect(s)
** CID 1522021: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522021: API usage errors (LOCK)
/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx: 276 in drawinglayer::primitive3d::HatchTexturePrimitive3D::HatchTexturePrimitive3D(drawinglayer::attribute::FillHatchAttribute, const drawinglayer::primitive3d::Primitive3DContainer &, const basegfx::B2DVector &, bool, bool)()
270 HatchTexturePrimitive3D::HatchTexturePrimitive3D(
271 attribute::FillHatchAttribute aHatch,
272 const Primitive3DContainer& rChildren,
273 const basegfx::B2DVector& rTextureSize,
274 bool bModulate,
275 bool bFilter)
>>> CID 1522021: API usage errors (LOCK)
>>> "TexturePrimitive3D" initializes "this->m_aMutex" while it is already initialized.
276 : TexturePrimitive3D(rChildren, rTextureSize, bModulate, bFilter),
277 maHatch(std::move(aHatch))
278 {
279 }
280
281 bool HatchTexturePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const
** CID 1522020: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522020: API usage errors (LOCK)
/toolkit/source/controls/dialogcontrol.cxx: 957 in UnoPageModel::UnoPageModel(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()
951 return "tabpage";
952 }
953
954
955 // ------------- UnoPageModel -----------------
956
>>> CID 1522020: API usage errors (LOCK)
>>> "ControlModelContainerBase" initializes "this->m_aMutex" while it is already initialized.
957 UnoPageModel::UnoPageModel( const Reference< XComponentContext >& rxContext ) : ControlModelContainerBase( rxContext )
958 {
959 ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
960 ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
961 ImplRegisterProperty( BASEPROPERTY_ENABLED );
962 ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
** CID 1522019: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522019: API usage errors (LOCK)
/toolkit/inc/controls/dialogcontrol.hxx: 238 in UnoPageModel::UnoPageModel(const UnoPageModel&)()
232
233
234 class UnoPageModel final : public ControlModelContainerBase
235 {
236 public:
237 UnoPageModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
>>> CID 1522019: API usage errors (LOCK)
>>> "ControlModelContainerBase" initializes "this->m_aMutex" while it is already initialized.
238 UnoPageModel(const UnoPageModel& rOther) : ControlModelContainerBase(rOther) {}
239 virtual ~UnoPageModel() override;
240
241 rtl::Reference<UnoControlModel> Clone() const override;
242
243 DECLIMPL_SERVICEINFO_DERIVED( UnoPageModel, ControlModelContainerBase, "com.sun.star.awt.UnoPageModel" )
** CID 1522018: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522018: API usage errors (LOCK)
/framework/source/uielement/footermenucontroller.cxx: 57 in framework::FooterMenuController::FooterMenuController(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()
51 css::uno::Sequence< OUString > SAL_CALL FooterMenuController::getSupportedServiceNames()
52 {
53 return { SERVICENAME_POPUPMENUCONTROLLER };
54 }
55
56 FooterMenuController::FooterMenuController( const css::uno::Reference< css::uno::XComponentContext >& xContext ) :
>>> CID 1522018: API usage errors (LOCK)
>>> "HeaderMenuController" initializes "this->m_aMutex" while it is already initialized.
57 HeaderMenuController( xContext,true )
58 {
59 }
60
61 FooterMenuController::~FooterMenuController()
62 {
** CID 1522017: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522017: API usage errors (LOCK)
/toolkit/source/controls/dialogcontrol.cxx: 170 in <unnamed>::UnoControlDialogModel::UnoControlDialogModel(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()
164 ps[s.getLength() - 1] = "stardiv.vcl.controlmodel.Dialog";
165 return s;
166 }
167 };
168
169 UnoControlDialogModel::UnoControlDialogModel( const Reference< XComponentContext >& rxContext )
>>> CID 1522017: API usage errors (LOCK)
>>> "ControlModelContainerBase" initializes "this->m_aMutex" while it is already initialized.
170 :ControlModelContainerBase( rxContext )
171 {
172 ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
173 // ImplRegisterProperty( BASEPROPERTY_BORDER );
174 ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
175 ImplRegisterProperty( BASEPROPERTY_ENABLED );
** CID 1522016: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522016: API usage errors (LOCK)
/framework/source/uielement/resourcemenucontroller.cxx: 382 in <unnamed>::SaveAsMenuController::SaveAsMenuController(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &)()
376 private:
377 virtual void impl_setPopupMenu() override;
378 };
379
380 SaveAsMenuController::SaveAsMenuController( const css::uno::Reference< css::uno::XComponentContext >& rContext,
381 const css::uno::Sequence< css::uno::Any >& rArgs )
>>> CID 1522016: API usage errors (LOCK)
>>> "ResourceMenuController" initializes "this->m_aMutex" while it is already initialized.
382 : ResourceMenuController( rContext, rArgs, false )
383 {
384 }
385
386 void InsertItem(const css::uno::Reference<css::awt::XPopupMenu>& rPopupMenu,
387 const OUString& rCommand)
** CID 1522015: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522015: API usage errors (LOCK)
/drawinglayer/source/primitive3d/textureprimitive3d.cxx: 151 in drawinglayer::primitive3d::BitmapTexturePrimitive3D::BitmapTexturePrimitive3D(const drawinglayer::attribute::FillGraphicAttribute &, const drawinglayer::primitive3d::Primitive3DContainer &, const basegfx::B2DVector &, bool, bool)()
145
146 BitmapTexturePrimitive3D::BitmapTexturePrimitive3D(
147 const attribute::FillGraphicAttribute& rFillGraphicAttribute,
148 const Primitive3DContainer& rChildren,
149 const basegfx::B2DVector& rTextureSize,
150 bool bModulate, bool bFilter)
>>> CID 1522015: API usage errors (LOCK)
>>> "TexturePrimitive3D" initializes "this->m_aMutex" while it is already initialized.
151 : TexturePrimitive3D(rChildren, rTextureSize, bModulate, bFilter),
152 maFillGraphicAttribute(rFillGraphicAttribute)
153 {
154 }
155
156 bool BitmapTexturePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const
** CID 1522014: Null pointer dereferences (NULL_RETURNS)
/sw/source/core/crsr/crsrsh.cxx: 2801 in SwCursorShell::IsEndOfDoc() const()
________________________________________________________________________________________________________
*** CID 1522014: Null pointer dereferences (NULL_RETURNS)
/sw/source/core/crsr/crsrsh.cxx: 2801 in SwCursorShell::IsEndOfDoc() const()
2795 {
2796 SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfContent(), -1 );
2797 SwContentNode* pCNd = aIdx.GetNode().GetContentNode();
2798 if( !pCNd )
2799 pCNd = SwNodes::GoPrevious( &aIdx );
2800
>>> CID 1522014: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pCNd" when calling "Len". (The dereference happens because this is a virtual function call.)
2801 return aIdx == m_pCurrentCursor->GetPoint()->GetNode() &&
2802 pCNd->Len() == m_pCurrentCursor->GetPoint()->GetContentIndex();
2803 }
2804
2805 /** Invalidate cursors
2806
** CID 1522013: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522013: API usage errors (LOCK)
/framework/source/uielement/resourcemenucontroller.cxx: 416 in <unnamed>::WindowListMenuController::WindowListMenuController(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &, const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &)()
410
411 class WindowListMenuController : public ResourceMenuController
412 {
413 public:
414 WindowListMenuController( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
415 const css::uno::Sequence< css::uno::Any >& rxArgs )
>>> CID 1522013: API usage errors (LOCK)
>>> "ResourceMenuController" initializes "this->m_aMutex" while it is already initialized.
416 : ResourceMenuController(rxContext, rxArgs, false) {}
417
418 // XMenuListener
419 void SAL_CALL itemActivated( const css::awt::MenuEvent& rEvent ) override;
420 void SAL_CALL itemSelected( const css::awt::MenuEvent& rEvent ) override;
421
** CID 1522012: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522012: API usage errors (LOCK)
/toolkit/inc/controls/dialogcontrol.hxx: 163 in UnoMultiPageModel::UnoMultiPageModel(const UnoMultiPageModel&)()
157 };
158
159 class UnoMultiPageModel final : public ControlModelContainerBase
160 {
161 public:
162 UnoMultiPageModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
>>> CID 1522012: API usage errors (LOCK)
>>> "ControlModelContainerBase" initializes "this->m_aMutex" while it is already initialized.
163 UnoMultiPageModel(const UnoMultiPageModel& rOther) : ControlModelContainerBase(rOther) {}
164 virtual ~UnoMultiPageModel() override;
165
166 rtl::Reference<UnoControlModel> Clone() const override;
167
168 DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageModel, ControlModelContainerBase, "com.sun.star.awt.UnoMultiPageModel" )
** CID 1522011: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522011: API usage errors (LOCK)
/drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx: 33 in drawinglayer::primitive3d::ModifiedColorPrimitive3D::ModifiedColorPrimitive3D(const drawinglayer::primitive3d::Primitive3DContainer &, std::shared_ptr<basegfx::BColorModifier>)()
27
28 namespace drawinglayer::primitive3d
29 {
30 ModifiedColorPrimitive3D::ModifiedColorPrimitive3D(
31 const Primitive3DContainer& rChildren,
32 basegfx::BColorModifierSharedPtr xColorModifier)
>>> CID 1522011: API usage errors (LOCK)
>>> "GroupPrimitive3D" initializes "this->m_aMutex" while it is already initialized.
33 : GroupPrimitive3D(rChildren),
34 maColorModifier(std::move(xColorModifier))
35 {
36 }
37
38 bool ModifiedColorPrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const
** CID 1522010: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522010: API usage errors (LOCK)
/framework/source/uiconfiguration/uicategorydescription.cxx: 366 in <unnamed>::UICategoryDescription::UICategoryDescription(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()
360 return {"com.sun.star.ui.UICategoryDescription"};
361 }
362
363 };
364
365 UICategoryDescription::UICategoryDescription( const Reference< XComponentContext >& rxContext ) :
>>> CID 1522010: API usage errors (LOCK)
>>> "UICommandDescription" initializes "this->m_aMutex" while it is already initialized.
366 UICommandDescription(rxContext,true)
367 {
368 SvtSysLocale aSysLocale;
369 const LanguageTag& rCurrentLanguage = aSysLocale.GetUILanguageTag();
370 Reference< XNameAccess > xEmpty;
371 OUString aGenericCategories( "GenericCategories" );
** CID 1522009: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522009: API usage errors (LOCK)
/toolkit/source/controls/spinningprogress.cxx: 54 in <unnamed>::SpinningProgressControlModel::SpinningProgressControlModel(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()
48
49 protected:
50 virtual ~SpinningProgressControlModel() override;
51 };
52
53 SpinningProgressControlModel::SpinningProgressControlModel( Reference< XComponentContext > const & i_factory )
>>> CID 1522009: API usage errors (LOCK)
>>> "AnimatedImagesControlModel" initializes "this->m_aMutex" while it is already initialized.
54 :SpinningProgressControlModel_Base( i_factory )
55 {
56 // default image sets
57 osl_atomic_increment( &m_refCount );
58 {
59 try
** CID 1522008: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522008: API usage errors (LOCK)
/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx: 725 in drawinglayer::primitive3d::PolygonTubePrimitive3D::PolygonTubePrimitive3D(const basegfx::B3DPolygon &, const basegfx::BColor &, double, basegfx::B2DLineJoin, com::sun::star::drawing::LineCap, double, double)()
719 const basegfx::B3DPolygon& rPolygon,
720 const basegfx::BColor& rBColor,
721 double fRadius, basegfx::B2DLineJoin aLineJoin,
722 css::drawing::LineCap aLineCap,
723 double fDegreeStepWidth,
724 double fMiterMinimumAngle)
>>> CID 1522008: API usage errors (LOCK)
>>> "PolygonHairlinePrimitive3D" initializes "this->m_aMutex" while it is already initialized.
725 : PolygonHairlinePrimitive3D(rPolygon, rBColor),
726 mfRadius(fRadius),
727 mfDegreeStepWidth(fDegreeStepWidth),
728 mfMiterMinimumAngle(fMiterMinimumAngle),
729 maLineJoin(aLineJoin),
730 maLineCap(aLineCap)
** CID 1522007: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522007: API usage errors (LOCK)
/include/toolkit/controls/unocontrols.hxx: 909 in UnoControlComboBoxModel::UnoControlComboBoxModel(const UnoControlComboBoxModel&)()
903 {
904 css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
905 ::cppu::IPropertyArrayHelper& getInfoHelper() override;
906
907 public:
908 UnoControlComboBoxModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
>>> CID 1522007: API usage errors (LOCK)
>>> "UnoControlListBoxModel" initializes "this->m_aMutex" while it is already initialized.
909 UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {}
910
911 rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlComboBoxModel( *this ); }
912
913 // css::io::XPersistObject
914 OUString SAL_CALL getServiceName() override;
** CID 1522005: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522005: API usage errors (LOCK)
/toolkit/source/controls/dialogcontrol.cxx: 204 in <unnamed>::UnoControlDialogModel::UnoControlDialogModel(const <unnamed>::UnoControlDialogModel&)()
198 // #TODO separate class for 'UserForm' ( instead of re-using Dialog ? )
199 uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >;
200 ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::Any( xNameCont ) );
201 }
202
203 UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rModel )
>>> CID 1522005: API usage errors (LOCK)
>>> "ControlModelContainerBase" initializes "this->m_aMutex" while it is already initialized.
204 : ControlModelContainerBase( rModel )
205 {
206 // need to clone BASEPROPERTY_USERFORMCONTAINEES too
207 Reference< XNameContainer > xSrcNameCont( const_cast< UnoControlDialogModel& >(rModel).getPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ) ), UNO_QUERY );
208 Reference<XNameContainer > xNameCont( new SimpleNamedThingContainer< XControlModel > );
209
** CID 1522004: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522004: API usage errors (LOCK)
/toolkit/source/controls/tabpagemodel.cxx: 42 in UnoControlTabPageModel::UnoControlTabPageModel(const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> &)()
36
37 using namespace ::com::sun::star;
38 using namespace ::com::sun::star::uno;
39 using namespace ::com::sun::star::awt;
40
41 UnoControlTabPageModel::UnoControlTabPageModel( Reference< XComponentContext > const & i_factory )
>>> CID 1522004: API usage errors (LOCK)
>>> "ControlModelContainerBase" initializes "this->m_aMutex" while it is already initialized.
42 :ControlModelContainerBase( i_factory )
43 {
44 ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
45 ImplRegisterProperty( BASEPROPERTY_TITLE );
46 ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
47 ImplRegisterProperty( BASEPROPERTY_HELPURL );
** CID 1522003: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522003: API usage errors (LOCK)
/drawinglayer/source/primitive3d/textureprimitive3d.cxx: 36 in drawinglayer::primitive3d::TexturePrimitive3D::TexturePrimitive3D(const drawinglayer::primitive3d::Primitive3DContainer &, const basegfx::B2DVector &, bool, bool)()
30 namespace drawinglayer::primitive3d
31 {
32 TexturePrimitive3D::TexturePrimitive3D(
33 const Primitive3DContainer& rChildren,
34 const basegfx::B2DVector& rTextureSize,
35 bool bModulate, bool bFilter)
>>> CID 1522003: API usage errors (LOCK)
>>> "GroupPrimitive3D" initializes "this->m_aMutex" while it is already initialized.
36 : GroupPrimitive3D(rChildren),
37 maTextureSize(rTextureSize),
38 mbModulate(bModulate),
39 mbFilter(bFilter)
40 {
41 }
** CID 1522002: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522002: API usage errors (LOCK)
/drawinglayer/source/primitive3d/textureprimitive3d.cxx: 124 in drawinglayer::primitive3d::GradientTexturePrimitive3D::GradientTexturePrimitive3D(drawinglayer::attribute::FillGradientAttribute, const drawinglayer::primitive3d::Primitive3DContainer &, const basegfx::B2DVector &, bool, bool)()
118 GradientTexturePrimitive3D::GradientTexturePrimitive3D(
119 attribute::FillGradientAttribute aGradient,
120 const Primitive3DContainer& rChildren,
121 const basegfx::B2DVector& rTextureSize,
122 bool bModulate,
123 bool bFilter)
>>> CID 1522002: API usage errors (LOCK)
>>> "TexturePrimitive3D" initializes "this->m_aMutex" while it is already initialized.
124 : TexturePrimitive3D(rChildren, rTextureSize, bModulate, bFilter),
125 maGradient(std::move(aGradient))
126 {
127 }
128
129 bool GradientTexturePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const
** CID 1522001: API usage errors (LOCK)
________________________________________________________________________________________________________
*** CID 1522001: API usage errors (LOCK)
/drawinglayer/source/primitive3d/transformprimitive3d.cxx: 33 in drawinglayer::primitive3d::TransformPrimitive3D::TransformPrimitive3D(basegfx::B3DHomMatrix, const drawinglayer::primitive3d::Primitive3DContainer &)()
27
28 namespace drawinglayer::primitive3d
29 {
30 TransformPrimitive3D::TransformPrimitive3D(
31 basegfx::B3DHomMatrix aTransformation,
32 const Primitive3DContainer& rChildren)
>>> CID 1522001: API usage errors (LOCK)
>>> "GroupPrimitive3D" initializes "this->m_aMutex" while it is already initialized.
33 : GroupPrimitive3D(rChildren),
34 maTransformation(std::move(aTransformation))
35 {
36 }
37
38 bool TransformPrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DqMNj_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi3miXUIH8V63Guq7S0fjXtKd0cW9ZAGIkIdM-2FKK-2Bu3jZFV8q-2BRKTKWUGOZ7wF-2BjSWib5pePXioLOv-2BQQDOQoVeLTI8css6aM7Q-2BaMapJvFdGwyI2AG-2FpfvlKi8Wj-2BPgX2sxzWSiTrdQLad-2FAH6LCn5KHdOXcajQ5y4fC5h51bU9k-3D
More information about the LibreOffice
mailing list