New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Tue Jan 11 17:02:21 UTC 2022
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.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 1497094: Uninitialized members (UNINIT_CTOR)
/svx/source/items/customshapeitem.cxx: 41 in SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)()
________________________________________________________________________________________________________
*** CID 1497094: Uninitialized members (UNINIT_CTOR)
/svx/source/items/customshapeitem.cxx: 41 in SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)()
35 {}
36
37 SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem( const uno::Sequence< beans::PropertyValue >& rVal )
38 : SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )
39 {
40 SetPropSeq( rVal );
>>> CID 1497094: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "aHash" is not initialized in this constructor nor in any functions that it calls.
41 }
42
43 css::uno::Any* SdrCustomShapeGeometryItem::GetPropertyValueByName( const OUString& rPropName )
44 {
45 css::uno::Any* pRet = nullptr;
46 PropertyHashMap::iterator aHashIter( aPropHashMap.find( rPropName ) );
** CID 1497093: Uninitialized members (UNINIT_CTOR)
/svx/source/items/customshapeitem.cxx: 35 in SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem()()
________________________________________________________________________________________________________
*** CID 1497093: Uninitialized members (UNINIT_CTOR)
/svx/source/items/customshapeitem.cxx: 35 in SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem()()
29 using namespace ::std;
30 using namespace com::sun::star;
31
32
33 SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem()
34 : SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )
>>> CID 1497093: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "aHash" is not initialized in this constructor nor in any functions that it calls.
35 {}
36
37 SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem( const uno::Sequence< beans::PropertyValue >& rVal )
38 : SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )
39 {
40 SetPropSeq( rVal );
** CID 1497092: Incorrect expression (UNINTENDED_INTEGER_DIVISION)
/sc/source/ui/view/output.cxx: 923 in <unnamed>::drawIconSets(OutputDevice &, const ScIconSetInfo *, const tools::Rectangle &, long, long, std::map<rtl::OUString, BitmapEx, std::less<rtl::OUString>, std::allocator<std::pair<const rtl::OUString, BitmapEx>>> &)()
________________________________________________________________________________________________________
*** CID 1497092: Incorrect expression (UNINTENDED_INTEGER_DIVISION)
/sc/source/ui/view/output.cxx: 923 in <unnamed>::drawIconSets(OutputDevice &, const ScIconSetInfo *, const tools::Rectangle &, long, long, std::map<rtl::OUString, BitmapEx, std::less<rtl::OUString>, std::allocator<std::pair<const rtl::OUString, BitmapEx>>> &)()
917 tools::Long aHeight = o3tl::convert(10, o3tl::Length::pt, o3tl::Length::mm100);
918
919 if (pOldIconSetInfo->mnHeight)
920 aHeight = o3tl::convert(pOldIconSetInfo->mnHeight, o3tl::Length::twip, o3tl::Length::mm100);
921
922 Size aSize = rIcon.GetSizePixel();
>>> CID 1497092: Incorrect expression (UNINTENDED_INTEGER_DIVISION)
>>> Dividing integer expressions "aSize.Width()" and "aSize.Height()", and then converting the integer quotient to type "double". Any remainder, or fractional part of the quotient, is ignored.
923 double fRatio = aSize.Width() / aSize.Height();
924 tools::Long aWidth = fRatio * aHeight;
925
926 rRenderContext.Push();
927 rRenderContext.SetClipRegion(vcl::Region(rRect));
928 rRenderContext.DrawBitmapEx(Point(rRect.Left() + 2 * nOneX, rRect.Bottom() - 2 * nOneY - aHeight), Size(aWidth, aHeight), rIcon);
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DoVc3_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi8BUTjHh3o7fdlY-2FgGmHgkH7ES0qucQJzWG1ivtDydWKmn3oguIvnCreUuDDkjAo9ZT0h-2BbFVsrLAEhK1JQgumfuXjWJkUDlnlLWvOZhieN3Z6iEZu7JCke08LaZ4TsueN-2BAzc-2FH2R8IVumO25NhAF5rlQC5FMQ4DLKDlcZY8Ac4-3D
More information about the LibreOffice
mailing list