New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sat Jul 25 08:23:20 UTC 2020


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 1465512:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/vcl/source/control/edit.cxx: 208 in Edit::set_property(const rtl::OString &, const rtl::OUString &)()


________________________________________________________________________________________________________
*** CID 1465512:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/vcl/source/control/edit.cxx: 208 in Edit::set_property(const rtl::OString &, const rtl::OUString &)()
202                 mbPassword = true;
203         }
204         else if (rKey == "placeholder-text")
205             SetPlaceholderText(rValue);
206         else if (rKey == "shadow-type")
207         {
>>>     CID 1465512:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>>     "this->GetStyle() | 8L /* WB_BORDER */" is always 1/true regardless of the values of its operand. This occurs as the logical operand of "if".
208             if (GetStyle() | WB_BORDER)
209                 SetBorderStyle(rValue == "none" ? WindowBorderStyle::MONO : WindowBorderStyle::NORMAL);
210         }
211         else
212             return Control::set_property(rKey, rValue);
213         return true;

** CID 1465511:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1465511:  Null pointer dereferences  (NULL_RETURNS)
/toolkit/source/awt/vclxwindows.cxx: 5957 in VCLXMetricField::setProperty(const rtl::OUString &, const com::sun::star::uno::Any &)()
5951                 case BASEPROPERTY_NUMSHOWTHOUSANDSEP:
5952                 {
5953                     bool b = false;
5954                     if ( Value >>= b )
5955                     {
5956                         NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
>>>     CID 1465511:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "nullptr" "pNumericFormatter" when calling "SetUseThousandSep".
5957                         pNumericFormatter->SetUseThousandSep( b );
5958                     }
5959                 }
5960                 break;
5961                 case BASEPROPERTY_UNIT:
5962                 {

** CID 1465510:    (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1465510:    (NULL_RETURNS)
/toolkit/source/awt/vclxwindows.cxx: 5653 in VCLXNumericField::setProperty(const rtl::OUString &, const com::sun::star::uno::Any &)()
5647             {
5648                 case BASEPROPERTY_VALUE_DOUBLE:
5649                 {
5650                     if ( bVoid )
5651                     {
5652                         NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
>>>     CID 1465510:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "nullptr" "pNumericFormatter" when calling "EnableEmptyFieldValue".
5653                         pNumericFormatter->EnableEmptyFieldValue( true );
5654                         pNumericFormatter->SetEmptyFieldValue();
5655                     }
5656                     else
5657                     {
5658                         double d = 0;
/toolkit/source/awt/vclxwindows.cxx: 5698 in VCLXNumericField::setProperty(const rtl::OUString &, const com::sun::star::uno::Any &)()
5692                 case BASEPROPERTY_NUMSHOWTHOUSANDSEP:
5693                 {
5694                     bool b = bool();
5695                     if ( Value >>= b )
5696                     {
5697                         NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
>>>     CID 1465510:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "nullptr" "pNumericFormatter" when calling "SetUseThousandSep".
5698                         pNumericFormatter->SetUseThousandSep( b );
5699                     }
5700                 }
5701                 break;
5702                 default:
5703                 {

** CID 1465509:  Uninitialized members  (UNINIT_CTOR)
/cui/source/inc/AdditionsDialog.hxx: 43 in AdditionsItem::AdditionsItem(weld::Widget *)()


________________________________________________________________________________________________________
*** CID 1465509:  Uninitialized members  (UNINIT_CTOR)
/cui/source/inc/AdditionsDialog.hxx: 43 in AdditionsItem::AdditionsItem(weld::Widget *)()
37             , m_xImageVoting(m_xBuilder->weld_image("imageVoting"))
38             , m_xImageDownloadNumber(m_xBuilder->weld_image("imageDownloadNumber"))
39             , m_xLabelDownloadNumber(m_xBuilder->weld_label("labelDownloadNumber"))
40             , m_xButtonShowMore(m_xBuilder->weld_button("buttonShowMore"))
41         {
42             m_xButtonShowMore->connect_clicked(LINK(this, AdditionsItem, ShowMoreHdl));
>>>     CID 1465509:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "m_pParentDialog" is not initialized in this constructor nor in any functions that it calls.
43         }
44     
45         DECL_LINK(ShowMoreHdl, weld::Button&, void);
46     
47         std::unique_ptr<weld::Builder> m_xBuilder;
48         std::unique_ptr<weld::Widget> m_xContainer;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DVviF_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiJH-2BDVvv6h2aClpOnrR1dLxrFM9NUpS-2FTW-2Bmm20ikUe7mxQ-2FqayVycm-2BoUo2wTfc-2FBgTkCVf9vQpVpX6A-2ByBXxAEhK2-2F9XEvJc3ORKG0-2F02K7d3me-2BXh4eWKhexPYkK914QyTiQEySEpJla3w0a12IaCzrdNjLiG4y5XwUvr15QRn36C2-2BaYyzDXzy5mf1jiI



More information about the LibreOffice mailing list