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.
29 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 4 of 4 defect(s)


** CID 1664822:       Error handling issues  (UNCAUGHT_EXCEPT)
/include/vcl/outdev.hxx: 1926           in 
OutputDevice::ScopedPush(vcl::PushFlags)::OutputDeviceRestoreStateGuard::~OutputDeviceRestoreStateGuard()()


_____________________________________________________________________________________________
*** CID 1664822:         Error handling issues  (UNCAUGHT_EXCEPT)
/include/vcl/outdev.hxx: 1926             in 
OutputDevice::ScopedPush(vcl::PushFlags)::OutputDeviceRestoreStateGuard::~OutputDeviceRestoreStateGuard()()
1920     
1921     [[nodiscard]] inline auto OutputDevice::ScopedPush(vcl::PushFlags 
nFlags)
1922     {
1923         struct OutputDeviceRestoreStateGuard
1924         {
1925             OutputDevice& m_rDev;
>>>     CID 1664822:         Error handling issues  (UNCAUGHT_EXCEPT)
>>>     An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the exception specification "/*implicit*/noexcept" doesn't allow it to 
>>> be thrown. This will result in a call to terminate().
1926             ~OutputDeviceRestoreStateGuard() { m_rDev.Pop(); }
1927         };
1928     
1929         Push(nFlags);
1930         // [-loplugin:redundantfcast]
1931         return OutputDeviceRestoreStateGuard{ *this };
1932     }
1933     

** CID 1664821:         (RESOURCE_LEAK)
/sc/source/ui/view/formatsh.cxx: 1087           in 
ScFormatShell::ExecuteAttr(SfxRequest &)()
/sc/source/ui/view/formatsh.cxx: 1117           in 
ScFormatShell::ExecuteAttr(SfxRequest &)()


_____________________________________________________________________________________________
*** CID 1664821:           (RESOURCE_LEAK)
/sc/source/ui/view/formatsh.cxx: 1087             in 
ScFormatShell::ExecuteAttr(SfxRequest &)()
1081     
1082                             
const_cast<::editeng::SvxBorderLine*>(pLine)->GuessLinesWidths(
1083                                 lineStyle, InnerLineWidth, OuterLineWidth, 
LineDistance);
1084                         }
1085                         else
1086                         {
>>>     CID 1664821:           (RESOURCE_LEAK)
>>>     Overwriting "pLine" in "pLine = 
>>> pNewAttrs->Get(TypedWhichId<SvxLineItem>(10201), true)->GetLine()" leaks 
>>> the storage that "pLine" points to.
1087                             pLine = 
pNewAttrs->Get(SID_FRAME_LINESTYLE).GetLine();
1088                         }
1089     
1090                         if ( pLine )
1091                         {
1092                             ::editeng::SvxBorderLine* pDefLine = 
pTabViewShell->GetDefaultFrameLine();
/sc/source/ui/view/formatsh.cxx: 1117             in 
ScFormatShell::ExecuteAttr(SfxRequest &)()
1111                             ::editeng::SvxBorderLine aDefLine( 
&aColorBlack, 20,
1112                                     SvxBorderLineStyle::SOLID );
1113                             pTabViewShell->SetDefaultFrameLine( &aDefLine 
);
1114                             pTabViewShell->SetSelectionFrameLines( 
nullptr, false );
1115                         }
1116                         rReq.Done();
>>>     CID 1664821:           (RESOURCE_LEAK)
>>>     Variable "pLine" going out of scope leaks the storage it points to.
1117                     }
1118                     break;
1119     
1120                 case SID_FRAME_LINECOLOR:
1121                     {
1122                         ::editeng::SvxBorderLine*  pDefLine = 
pTabViewShell->GetDefaultFrameLine();

** CID 1664820:       Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 7125           in 
SwContentTree::BringCommentToAttention(unsigned short)()


_____________________________________________________________________________________________
*** CID 1664820:         Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 7125             in 
SwContentTree::BringCommentToAttention(unsigned short)()
7119                 m_xTreeView->set_cursor(*xIter);
7120                 m_xTreeView->select(*xIter);
7121                 m_xTreeView->expand_row(*xIter);
7122                 UpdateContentFunctionsToolbar();
7123     
7124                 int nCount = m_xTreeView->iter_n_children(*xIter);
>>>     CID 1664820:         Error handling issues  (CHECKED_RETURN)
>>>     Calling "iter_children" without checking return value (as is done 
>>> elsewhere 61 out of 63 times).
7125                 m_xTreeView->iter_children(*xIter);
7126                 for (int i = 0; i < nCount; ++i)
7127                 {
7128                     if (const SwPostItContent* pPostIt = 
weld::fromId<SwPostItContent*>(m_xTreeView->get_id(*xIter)))
7129                     {
7130                         if (nCommentId == 
pPostIt->GetPostItField()->GetPostItId())

** CID 1664819:       Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 7137           in 
SwContentTree::BringCommentToAttention(unsigned short)()


_____________________________________________________________________________________________
*** CID 1664819:         Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 7137             in 
SwContentTree::BringCommentToAttention(unsigned short)()
7131                         {
7132                             
GotoContent(weld::fromId<SwContent*>(m_xTreeView->get_id(*xIter)));
7133                             m_xTreeView->grab_focus();
7134                             break;
7135                         }
7136                     }
>>>     CID 1664819:         Error handling issues  (CHECKED_RETURN)
>>>     Calling "iter_next" without checking return value (as is done elsewhere 
>>> 89 out of 90 times).
7137                     m_xTreeView->iter_next(*xIter);
7138                 }
7139                 break;
7140             }
7141             else
7142                 m_xTreeView->collapse_row(*xIter);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://scan.coverity.com/projects/libreoffice?tab=overview

Reply via email to