New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Tue Jun 1 08:47:21 UTC 2021


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.
2 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 5 of 5 defect(s)


** CID 1485154:    (UNINIT)


________________________________________________________________________________________________________
*** CID 1485154:    (UNINIT)
/editeng/source/rtf/svxrtf.cxx: 738 in SvxRTFParser::AttrGroupEnd()()
732                     else
733                     {
734                         // Now it gets complicated:
735                         // - all character attributes sre keep the area
736                         // - all paragraph attributes to get the area
737                         //   up to the previous paragraph
>>>     CID 1485154:    (UNINIT)
>>>     Using uninitialized value "<storage from new>->mxStartNodeIdx" when calling "SvxRTFItemStackType".
738                         std::unique_ptr<SvxRTFItemStackType> pNew(
739                             new SvxRTFItemStackType(*pOld, *mxInsertPosition, true));
740                         pNew->aAttrSet.SetParent( pOld->aAttrSet.GetParent() );
741     
742                         // Delete all paragraph attributes from pNew
743                         for( sal_uInt16 n = 0; n < (sizeof(aPardMap) / sizeof(sal_uInt16)) &&
/editeng/source/rtf/svxrtf.cxx: 814 in SvxRTFParser::AttrGroupEnd()()
808                     {
809                         // at the beginning of a paragraph? Move back one position
810                         MovePos();
811                         bCrsrBack = false;
812     
813                         // Open a new Group.
>>>     CID 1485154:    (UNINIT)
>>>     Using uninitialized value "<storage from new>->mxStartNodeIdx" when calling "SvxRTFItemStackType".
814                         std::unique_ptr<SvxRTFItemStackType> pNew(new SvxRTFItemStackType(
815                                                 *pCurrent, *mxInsertPosition, true ));
816                         pNew->SetRTFDefaults( GetRTFDefaults() );
817     
818                         // Set all until here valid Attributes
819                         AttrGroupEnd();

** CID 1485153:  Uninitialized variables  (UNINIT)


________________________________________________________________________________________________________
*** CID 1485153:  Uninitialized variables  (UNINIT)
/editeng/source/rtf/rtfitem.cxx: 221 in SvxRTFParser::ReadAttr(int, SfxItemSet *)()
215                         break;
216     
217                     if (pCurrent->aAttrSet.Count() || pCurrent->m_pChildList ||
218                         pCurrent->nStyleNo )
219                     {
220                         // Open a new Group
>>>     CID 1485153:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "<storage from new>->mxStartNodeIdx" when calling "SvxRTFItemStackType".
221                         std::unique_ptr<SvxRTFItemStackType> pNew(new SvxRTFItemStackType(
222                                                     *pCurrent, *mxInsertPosition, true ));
223                         pNew->SetRTFDefaults( GetRTFDefaults() );
224     
225                         // "Set" all valid attributes up until this point
226                         AttrGroupEnd();

** CID 1485152:    (UNINIT)


________________________________________________________________________________________________________
*** CID 1485152:    (UNINIT)
/editeng/source/rtf/svxrtf.cxx: 617 in SvxRTFParser::GetAttrSet_()()
611     
612     SvxRTFItemStackType* SvxRTFParser::GetAttrSet_()
613     {
614         SvxRTFItemStackType* pCurrent = aAttrStack.empty() ? nullptr : aAttrStack.back().get();
615         std::unique_ptr<SvxRTFItemStackType> pNew;
616         if( pCurrent )
>>>     CID 1485152:    (UNINIT)
>>>     Using uninitialized value "<storage from new>->mxStartNodeIdx" when calling "SvxRTFItemStackType".
617             pNew.reset(new SvxRTFItemStackType( *pCurrent, *mxInsertPosition, false/*bCopyAttr*/ ));
618         else
619             pNew.reset(new SvxRTFItemStackType( *pAttrPool, aWhichMap.data(),
620                                             *mxInsertPosition ));
621         pNew->SetRTFDefaults( GetRTFDefaults() );
622     
/editeng/source/rtf/svxrtf.cxx: 619 in SvxRTFParser::GetAttrSet_()()
613     {
614         SvxRTFItemStackType* pCurrent = aAttrStack.empty() ? nullptr : aAttrStack.back().get();
615         std::unique_ptr<SvxRTFItemStackType> pNew;
616         if( pCurrent )
617             pNew.reset(new SvxRTFItemStackType( *pCurrent, *mxInsertPosition, false/*bCopyAttr*/ ));
618         else
>>>     CID 1485152:    (UNINIT)
>>>     Using uninitialized value "<storage from new>->mxStartNodeIdx" when calling "SvxRTFItemStackType".
619             pNew.reset(new SvxRTFItemStackType( *pAttrPool, aWhichMap.data(),
620                                             *mxInsertPosition ));
621         pNew->SetRTFDefaults( GetRTFDefaults() );
622     
623         aAttrStack.push_back( std::move(pNew) );
624         bNewGroup = false;

** CID 1485151:  Uninitialized variables  (UNINIT)


________________________________________________________________________________________________________
*** CID 1485151:  Uninitialized variables  (UNINIT)
/editeng/source/rtf/rtfitem.cxx: 1707 in SvxRTFParser::RTFPardPlain(bool, SfxItemSet **)()
1701             RTF_PLAIN != nLastToken &&
1702             BRACELEFT != nLastToken )
1703         {
1704             if (pCurrent->aAttrSet.Count() || pCurrent->m_pChildList || pCurrent->nStyleNo)
1705             {
1706                 // open a new group
>>>     CID 1485151:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "<storage from new>->mxStartNodeIdx" when calling "SvxRTFItemStackType".
1707                 std::unique_ptr<SvxRTFItemStackType> pNew(new SvxRTFItemStackType( *pCurrent, *mxInsertPosition, true ));
1708                 pNew->SetRTFDefaults( GetRTFDefaults() );
1709     
1710                 // Set all until here valid attributes
1711                 AttrGroupEnd();
1712                 pCurrent = aAttrStack.empty() ? nullptr : aAttrStack.back().get();  // can be changed after AttrGroupEnd!

** CID 1485150:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/9/optional: 254 in std::_Optional_payload_base<sd::ClientView>::_M_destroy()()


________________________________________________________________________________________________________
*** CID 1485150:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/9/optional: 254 in std::_Optional_payload_base<sd::ClientView>::_M_destroy()()
248               ::new ((void *) std::__addressof(this->_M_payload))
249                 _Stored_type(std::forward<_Args>(__args)...);
250               this->_M_engaged = true;
251             }
252     
253           constexpr void
>>>     CID 1485150:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     An exception of type "com::sun::star::uno::RuntimeException" is thrown but the throw list "noexcept" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
254           _M_destroy() noexcept
255           {
256     	_M_engaged = false;
257     	_M_payload._M_value.~_Stored_type();
258           }
259     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DOeQT_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJitSnsAdBwKwKWdDUCtR2nnCNqSRtQgtC7rF6Zs9uiuy95P1LenYxboMwzj7Xa3HwzqXk7ycPTBD3FgxWHc7Np3mCQOmQkYjiRMwNfsFkAyyyqeULQ1MnkSBkDaQdqlnBmO9C0f1fEdpIDuVYt1mbld6cx6LaRMCHriQHB4V-2B0IXk-3D



More information about the LibreOffice mailing list