New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Sat Sep 18 08:01:30 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.
New defect(s) Reported-by: Coverity Scan
Showing 5 of 5 defect(s)
** CID 1491949: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1491949: Null pointer dereferences (FORWARD_NULL)
/i18npool/source/transliteration/transliteration_Numeric.cxx: 122 in i18npool::transliteration_Numeric::transliterateImpl(const rtl::OUString &, int, int, com::sun::star::uno::Sequence<int> *)()
116 transliteration_Numeric::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
117 Sequence< sal_Int32 >* pOffset )
118 {
119 if (tableSize)
120 return transliterateBullet( inStr, startPos, nCount, pOffset);
121 else
>>> CID 1491949: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "pOffset" to "getNativeNumberString", which dereferences it.
122 return rtl::Reference<NativeNumberSupplierService>(new NativeNumberSupplierService(bool(pOffset)))->getNativeNumberString( inStr.copy(startPos, nCount), aLocale, nNativeNumberMode, *pOffset );
123 }
124
125 sal_Unicode SAL_CALL
126 transliteration_Numeric::transliterateChar2Char( sal_Unicode inChar )
127 {
** CID 1491948: Null pointer dereferences (REVERSE_INULL)
/sw/source/core/doc/DocumentLayoutManager.cxx: 512 in sw::DocumentLayoutManager::CopyLayoutFormat(const SwFrameFormat &, const SwFormatAnchor &, bool, bool)()
________________________________________________________________________________________________________
*** CID 1491948: Null pointer dereferences (REVERSE_INULL)
/sw/source/core/doc/DocumentLayoutManager.cxx: 512 in sw::DocumentLayoutManager::CopyLayoutFormat(const SwFrameFormat &, const SwFormatAnchor &, bool, bool)()
506 pDestTextBox->GetContent().GetContentIdx()->GetNode().GetStartNode());
507 aSet.Put(aContent);
508 pDest->SetFormatAttr(aSet);
509
510 // Link FLY and DRAW formats, so it becomes a text box
511 SdrObject* pNewObj = pDest->FindRealSdrObject();
>>> CID 1491948: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "pDest" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
512 if (bIsGroupObj && pDest && pDest->FindRealSdrObject()
513 && pDest->FindRealSdrObject()->getChildrenOfSdrObject()
514 && (pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObjCount() > it)
515 && pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObj(it))
516 pNewObj = pDest->FindRealSdrObject()->getChildrenOfSdrObject()->GetObj(it);
517 pTextBoxNd->AddTextBox(pNewObj, pDestTextBox);
** CID 1491947: Error handling issues (UNCAUGHT_EXCEPT)
/usr/include/c++/9/ext/new_allocator.h: 151 in __gnu_cxx::new_allocator<sd::slidesorter::view::InsertionIndicatorOverlay>::destroy<sd::slidesorter::view::InsertionIndicatorOverlay>(T1 *)()
________________________________________________________________________________________________________
*** CID 1491947: Error handling issues (UNCAUGHT_EXCEPT)
/usr/include/c++/9/ext/new_allocator.h: 151 in __gnu_cxx::new_allocator<sd::slidesorter::view::InsertionIndicatorOverlay>::destroy<sd::slidesorter::view::InsertionIndicatorOverlay>(T1 *)()
145 noexcept(noexcept(::new((void *)__p)
146 _Up(std::forward<_Args>(__args)...)))
147 { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
148
149 template<typename _Up>
150 void
>>> CID 1491947: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "std::bad_weak_ptr" 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().
151 destroy(_Up* __p)
152 noexcept(noexcept( __p->~_Up()))
153 { __p->~_Up(); }
154 #else
155 // _GLIBCXX_RESOLVE_LIB_DEFECTS
156 // 402. wrong new expression in [some_] allocator::construct
** CID 1491946: Null pointer dereferences (REVERSE_INULL)
/i18npool/source/transliteration/textToPronounce_zh.cxx: 70 in i18npool::TextToPronounce_zh::foldingImpl(const rtl::OUString &, int, int, com::sun::star::uno::Sequence<int> *)()
________________________________________________________________________________________________________
*** CID 1491946: Null pointer dereferences (REVERSE_INULL)
/i18npool/source/transliteration/textToPronounce_zh.cxx: 70 in i18npool::TextToPronounce_zh::foldingImpl(const rtl::OUString &, int, int, com::sun::star::uno::Sequence<int> *)()
64
65 (*pOffset)[0] = 0;
66 for (sal_Int32 i = 0; i < nCount; i++) {
67 OUString pron(getPronounce(chArr[i]));
68 sb.append(pron);
69
>>> CID 1491946: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "pOffset" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
70 if (pOffset)
71 (*pOffset)[i + 1] = (*pOffset)[i] + pron.getLength();
72 }
73 return sb.makeStringAndClear();
74 }
75
** CID 1486004: Error handling issues (UNCAUGHT_EXCEPT)
/usr/include/c++/9/ext/new_allocator.h: 151 in __gnu_cxx::new_allocator<SbUnoStructRefObject>::destroy<SbUnoStructRefObject>(T1 *)()
________________________________________________________________________________________________________
*** CID 1486004: Error handling issues (UNCAUGHT_EXCEPT)
/usr/include/c++/9/ext/new_allocator.h: 151 in __gnu_cxx::new_allocator<SbUnoStructRefObject>::destroy<SbUnoStructRefObject>(T1 *)()
145 noexcept(noexcept(::new((void *)__p)
146 _Up(std::forward<_Args>(__args)...)))
147 { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
148
149 template<typename _Up>
150 void
>>> CID 1486004: 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().
151 destroy(_Up* __p)
152 noexcept(noexcept( __p->~_Up()))
153 { __p->~_Up(); }
154 #else
155 // _GLIBCXX_RESOLVE_LIB_DEFECTS
156 // 402. wrong new expression in [some_] allocator::construct
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DH9n-_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi4hMMwx-2B7SFwXg6PS93fBFWduqgtri8Ns-2B3R4sbpFYH5OCmNYQiLCOSlZHWely-2BRF9dUV-2BMoOW0Euv8-2FBOaPtxCcew7cuj2tQQJFLa0AOGZoM-2BJcIW5xQGL8sCQX0FPsYvGr57JxFIiYJTKmxNhguy9Twuqnndk-2BaywBc4z6W0k8-3D
More information about the LibreOffice
mailing list