New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sun Dec 22 06:43:10 UTC 2024


Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.

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


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


** CID 1636859:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1636859:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/ui/index/swuiidxmrk.cxx: 1727 in <unnamed>::SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window *, const rtl::OUString *, SwWrtShell &, bool, bool)()
1721             if(bLeft)
1722                 ++nLeftRow;
1723             else
1724                 ++nRightRow;
1725             bLeft = !bLeft;
1726         }
>>>     CID 1636859:  Null pointer dereferences  (FORWARD_NULL)
>>>     "SetFields" dereferences null "this->m_xLocalPageSB".
1727         SetFields(pFields, bNewEntry, !bNewEntry);
1728         assert(m_xTypeListBox && "this will exist after the loop");
1729         EnableHdl(*m_xTypeListBox);
1730     }
1731     
1732     void SwCreateAuthEntryDlg_Impl::SetFields(const OUString pFields[], bool bNewEntry, bool bSetIdentifier) {

** CID 1636858:    (REVERSE_INULL)
/sw/source/core/unocore/unostyle.cxx: 1699 in SwXStyle::SetPropertyValue<(unsigned short)90>(const SfxItemPropertyMapEntry &, const SfxItemPropertySet &, const com::sun::star::uno::Any &, SwStyleBase_Impl &)()
/sw/source/core/unocore/unostyle.cxx: 1687 in SwXStyle::SetPropertyValue<(unsigned short)90>(const SfxItemPropertyMapEntry &, const SfxItemPropertySet &, const com::sun::star::uno::Any &, SwStyleBase_Impl &)()


________________________________________________________________________________________________________
*** CID 1636858:    (REVERSE_INULL)
/sw/source/core/unocore/unostyle.cxx: 1699 in SwXStyle::SetPropertyValue<(unsigned short)90>(const SfxItemPropertyMapEntry &, const SfxItemPropertySet &, const com::sun::star::uno::Any &, SwStyleBase_Impl &)()
1693                         nBin = i;
1694                         break;
1695                     }
1696                 }
1697             }
1698         }
>>>     CID 1636858:    (REVERSE_INULL)
>>>     Null-checking "pPrinter" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1699         else if (rValue.has<sal_Int32>() && pPrinter)
1700         {
1701             sal_Int32 nValue (rValue.get<sal_Int32>());
1702             nBin = pPrinter->GetPaperBinBySourceIndex(nValue);
1703         }
1704     
/sw/source/core/unocore/unostyle.cxx: 1687 in SwXStyle::SetPropertyValue<(unsigned short)90>(const SfxItemPropertyMapEntry &, const SfxItemPropertySet &, const com::sun::star::uno::Any &, SwStyleBase_Impl &)()
1681         printeridx_t nBin = std::numeric_limits<printeridx_t>::max();
1682         if(rValue.has<OUString>())
1683         {
1684             OUString sValue(rValue.get<OUString>());
1685             if(sValue == "[From printer settings]")
1686                 nBin = std::numeric_limits<printeridx_t>::max()-1;
>>>     CID 1636858:    (REVERSE_INULL)
>>>     Null-checking "pPrinter" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1687             else if(pPrinter)
1688             {
1689                 for(printeridx_t i=0, nEnd = pPrinter->GetPaperBinCount(); i < nEnd; ++i)
1690                 {
1691                     if (sValue == pPrinter->GetPaperBinName(i))
1692                     {

** CID 1636857:  Null pointer dereferences  (REVERSE_INULL)
/cui/source/options/appearance.cxx: 224 in SvxAppearanceTabPage::Reset(const SfxItemSet *)()


________________________________________________________________________________________________________
*** CID 1636857:  Null pointer dereferences  (REVERSE_INULL)
/cui/source/options/appearance.cxx: 224 in SvxAppearanceTabPage::Reset(const SfxItemSet *)()
218         UpdateRemoveBtnState();
219     
220         // reset appearance
221         eCurrentAppearanceMode = static_cast<Appearance>(MiscSettings::GetAppColorMode());
222     
223         // reset ColorConfig
>>>     CID 1636857:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "this->pColorConfig" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
224         if (pColorConfig)
225         {
226             pColorConfig->ClearModified();
227             pColorConfig->DisableBroadcast();
228         }
229         pColorConfig.reset(new EditableColorConfig);

** CID 1636856:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1636856:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/ui/index/swuiidxmrk.cxx: 1727 in <unnamed>::SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window *, const rtl::OUString *, SwWrtShell &, bool, bool)()
1721             if(bLeft)
1722                 ++nLeftRow;
1723             else
1724                 ++nRightRow;
1725             bLeft = !bLeft;
1726         }
>>>     CID 1636856:  Null pointer dereferences  (FORWARD_NULL)
>>>     "SetFields" dereferences null "this->m_xLocalPageCB".
1727         SetFields(pFields, bNewEntry, !bNewEntry);
1728         assert(m_xTypeListBox && "this will exist after the loop");
1729         EnableHdl(*m_xTypeListBox);
1730     }
1731     
1732     void SwCreateAuthEntryDlg_Impl::SetFields(const OUString pFields[], bool bNewEntry, bool bSetIdentifier) {

** CID 1636855:    (OVERRUN)
/cui/source/options/appearance.cxx: 276 in SvxAppearanceTabPage::ColorEntryChgHdl(weld::ComboBox &)()
/cui/source/options/appearance.cxx: 303 in SvxAppearanceTabPage::ColorEntryChgHdl(weld::ComboBox &)()


________________________________________________________________________________________________________
*** CID 1636855:    (OVERRUN)
/cui/source/options/appearance.cxx: 276 in SvxAppearanceTabPage::ColorEntryChgHdl(weld::ComboBox &)()
270         else
271             m_xColorChangeBtn->SelectEntry(rCurrentEntryColor.nLightColor);
272     
273         m_xShowInDocumentChkBtn->set_active(rCurrentEntryColor.bIsVisible);
274     
275         // load image related settings if supported
>>>     CID 1636855:    (OVERRUN)
>>>     Overrunning array "svtools::<unnamed>::cNames" of 92 24-byte elements at element index 92 (byte offset 2231) using index "nEntry" (which evaluates to 92).
276         if (cNames[nEntry].bCanHaveBitmap)
277         {
278             EnableImageControls(true);
279             m_xImageRadioBtn->set_active(rCurrentEntryColor.bUseBitmapBackground);
280             m_xStretchedRadioBtn->set_active(rCurrentEntryColor.bIsBitmapStretched);
281     
/cui/source/options/appearance.cxx: 303 in SvxAppearanceTabPage::ColorEntryChgHdl(weld::ComboBox &)()
297         {
298             m_xColorRadioBtn->set_active(true);
299             EnableImageControls(false);
300         }
301     
302         // show/hide show in document button
>>>     CID 1636855:    (OVERRUN)
>>>     Overrunning array "svtools::<unnamed>::cNames" of 92 24-byte elements at element index 92 (byte offset 2231) using index "nEntry" (which evaluates to 92).
303         if (!cNames[nEntry].bCanBeVisible)
304             m_xShowInDocumentChkBtn->hide();
305         else
306             m_xShowInDocumentChkBtn->show();
307     }
308     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D83eP_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtnEY-2FTR2vYMt61DuzOrQ-2B6qxpMCeJ2ajQ0amrK56mJuA1FxBmxgV7SrC2Cj-2Bjcxl8OMZSTTBtwdHfuIQb-2Fl080WImm1wpQ2wYXWfpgGapV26QuaFAXgLWdsqYkMcw9ahVExowN0laUO568qDwmy7nyJcYw5Qk-2FjKXPyF5hyOarek-3D



More information about the LibreOffice mailing list