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.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)


** CID 1521561:  Null pointer dereferences  (REVERSE_INULL)
/package/source/xstor/owriteablestream.cxx: 1541 in OWriteStream::OWriteStream(OWriteStream_Impl *, bool)()


________________________________________________________________________________________________________
*** CID 1521561:  Null pointer dereferences  (REVERSE_INULL)
/package/source/xstor/owriteablestream.cxx: 1541 in OWriteStream::OWriteStream(OWriteStream_Impl *, bool)()
1535     , m_nInitPosition( 0 )
1536     , m_bTransacted( bTransacted )
1537     {
1538         OSL_ENSURE( pImpl, "No base implementation!" );
1539         OSL_ENSURE( m_pImpl->m_xMutex.is(), "No mutex!" );
1540     
>>>     CID 1521561:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "this->m_pImpl" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1541         if ( !m_pImpl || !m_pImpl->m_xMutex.is() )
1542             throw uno::RuntimeException(); // just a disaster
1543     }
1544     
1545     OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, uno::Reference< io::XStream > const & xStream, bool bTransacted )
1546     : m_pImpl( pImpl )

** CID 1521560:  Incorrect expression  (DIVIDE_BY_ZERO)
/oox/source/export/drawingml.cxx: 1976 in oox::drawingml::DrawingML::WriteXGraphicCustomPosition(const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::awt::Size &)()


________________________________________________________________________________________________________
*** CID 1521560:  Incorrect expression  (DIVIDE_BY_ZERO)
/oox/source/export/drawingml.cxx: 1976 in oox::drawingml::DrawingML::WriteXGraphicCustomPosition(const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::awt::Size &)()
1970         }
1971     
1972         sal_Int32 nL = 0, nT = 0, nR = 0, nB = 0;
1973         if (GetProperty(rXPropSet, "FillBitmapRectanglePoint"))
1974         {
1975             sal_Int32 nWidth = (1 - (nSizeX / rSize.Width)) * 100000;
>>>     CID 1521560:  Incorrect expression  (DIVIDE_BY_ZERO)
>>>     In expression "nSizeY / rSize.Height", division by expression "rSize.Height" which may be zero has undefined behavior.
1976             sal_Int32 nHeight = (1 - (nSizeY / rSize.Height)) * 100000;
1977     
1978             switch (*o3tl::doAccess<RectanglePoint>(mAny))
1979             {
1980                 case RectanglePoint_LEFT_TOP:      nR = nWidth;          nB = nHeight;          break;
1981                 case RectanglePoint_RIGHT_TOP:     nL = nWidth;          nB = nHeight;          break;

** CID 1521559:  Null pointer dereferences  (REVERSE_INULL)
/package/source/xstor/owriteablestream.cxx: 1558 in OWriteStream::OWriteStream(OWriteStream_Impl *, const com::sun::star::uno::Reference<com::sun::star::io::XStream> &, bool)()


________________________________________________________________________________________________________
*** CID 1521559:  Null pointer dereferences  (REVERSE_INULL)
/package/source/xstor/owriteablestream.cxx: 1558 in OWriteStream::OWriteStream(OWriteStream_Impl *, const com::sun::star::uno::Reference<com::sun::star::io::XStream> &, bool)()
1552     , m_nInitPosition( 0 )
1553     , m_bTransacted( bTransacted )
1554     {
1555         OSL_ENSURE( pImpl && xStream.is(), "No base implementation!" );
1556         OSL_ENSURE( m_pImpl->m_xMutex.is(), "No mutex!" );
1557     
>>>     CID 1521559:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "this->m_pImpl" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1558         if ( !m_pImpl || !m_pImpl->m_xMutex.is() )
1559             throw uno::RuntimeException(); // just a disaster
1560     
1561         if ( xStream.is() )
1562         {
1563             m_xInStream = xStream->getInputStream();

** CID 1521558:  Incorrect expression  (DIVIDE_BY_ZERO)
/oox/source/export/drawingml.cxx: 1975 in oox::drawingml::DrawingML::WriteXGraphicCustomPosition(const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::awt::Size &)()


________________________________________________________________________________________________________
*** CID 1521558:  Incorrect expression  (DIVIDE_BY_ZERO)
/oox/source/export/drawingml.cxx: 1975 in oox::drawingml::DrawingML::WriteXGraphicCustomPosition(const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::awt::Size &)()
1969             nSizeY = rSize.Height * std::abs(nSizeY);
1970         }
1971     
1972         sal_Int32 nL = 0, nT = 0, nR = 0, nB = 0;
1973         if (GetProperty(rXPropSet, "FillBitmapRectanglePoint"))
1974         {
>>>     CID 1521558:  Incorrect expression  (DIVIDE_BY_ZERO)
>>>     In expression "nSizeX / rSize.Width", division by expression "rSize.Width" which may be zero has undefined behavior.
1975             sal_Int32 nWidth = (1 - (nSizeX / rSize.Width)) * 100000;
1976             sal_Int32 nHeight = (1 - (nSizeY / rSize.Height)) * 100000;
1977     
1978             switch (*o3tl::doAccess<RectanglePoint>(mAny))
1979             {
1980                 case RectanglePoint_LEFT_TOP:      nR = nWidth;          nB = nHeight;          break;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DXfAv_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiscoz0WDPNisrdvy61HVDAiMKgCdMSt9qWafIsOIRd-2BItYjqMdKe9Lp1WtG9dY-2F409OkS1lbrZ8bwQ1asCldlfJlLcozFrxRltpyENy-2F3IvaEzJwtyPIN6azrz-2FuQDl6q1bimjkB-2BqaHMNLZ2tOSj-2BXhJT2rvpzuesyYYUvGe-2FwA-3D




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

  Powered by Linux