Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
14 new defect(s) introduced to LibreOffice found with Coverity Scan.
64 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 14 of 14 defect(s)
** CID 1338605: FindBugs: Dodgy code (FB.REC_CATCH_EXCEPTION)
/xmerge/source/bridge/java/XMergeBridge.java: 449 in
XMergeBridge$_XMergeBridge.convert(com.sun.star.io.XInputStream, com.sun.star.io.XOutputStream,
boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String)()
________________________________________________________________________________________________________
*** CID 1338605: FindBugs: Dodgy code (FB.REC_CATCH_EXCEPTION)
/xmerge/source/bridge/java/XMergeBridge.java: 449 in
XMergeBridge$_XMergeBridge.convert(com.sun.star.io.XInputStream, com.sun.star.io.XOutputStream,
boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String)()
443 }
444
445 }
446 }
447 ConverterInfoMgr.removeByJar(jarName);
448 }
CID 1338605: FindBugs: Dodgy code (FB.REC_CATCH_EXCEPTION)
Catching RuntimeExceptions, perhaps unintentionally, with a catch block for Exception.
449 catch (Exception ex1) {
450 /* Satisfy coverity */
451 newxos.flush();
452 newxos.close();
453 newxos = null;
454 xis.close();
** CID 1338604: Uninitialized members (UNINIT_CTOR)
/sfx2/source/doc/objxtor.cxx: 274 in SfxObjectShell_Impl::SfxObjectShell_Impl(SfxObjectShell &)()
________________________________________________________________________________________________________
*** CID 1338604: Uninitialized members (UNINIT_CTOR)
/sfx2/source/doc/objxtor.cxx: 274 in SfxObjectShell_Impl::SfxObjectShell_Impl(SfxObjectShell &)()
268 ,m_bModifyPasswordEntered( false )
269 {
270 SfxObjectShell* pDoc = &_rDocShell;
271 SfxObjectShellArr_Impl &rArr = SfxGetpApp()->GetObjectShells_Impl();
272 rArr.push_back( pDoc );
273 bInList = true;
CID 1338604: Uninitialized members (UNINIT_CTOR)
Non-static class member "bUseThumbnailSave" is not initialized in this constructor nor in
any functions that it calls.
274 }
275
276
277
278 SfxObjectShell_Impl::~SfxObjectShell_Impl()
279 {
** CID 1338603: Error handling issues (UNCAUGHT_EXCEPT)
/connectivity/source/drivers/flat/EConnection.cxx: 62 in
connectivity::flat::OFlatConnection::construct(const rtl::OUString &, const
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)()
________________________________________________________________________________________________________
*** CID 1338603: Error handling issues (UNCAUGHT_EXCEPT)
/connectivity/source/drivers/flat/EConnection.cxx: 62 in
connectivity::flat::OFlatConnection::construct(const rtl::OUString &, const
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)()
56
57 // XServiceInfo
58
59 IMPLEMENT_SERVICE_INFO(OFlatConnection, "com.sun.star.sdbc.drivers.flat.Connection",
"com.sun.star.sdbc.Connection")
60
61
CID 1338603: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException, com::sun::star::sdbc::SQLException)" doesn't
allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
62 void OFlatConnection::construct(const OUString& url,const Sequence< PropertyValue >& info)
63 throw(css::sdbc::SQLException, css::uno::RuntimeException)
64 {
65 osl_atomic_increment( &m_refCount );
66
67 const PropertyValue *pBegin = info.getConstArray();
** CID 1338602: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1210 in
com::sun::star::i18n::LocaleDataImpl::getHangingCharacters(const com::sun::star::lang::Locale &)()
________________________________________________________________________________________________________
*** CID 1338602: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1210 in
com::sun::star::i18n::LocaleDataImpl::getHangingCharacters(const com::sun::star::lang::Locale &)()
1204 ForbiddenCharacters chars1;
1205 return chars1;
1206 }
1207 }
1208
1209 OUString SAL_CALL
CID 1338602: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a
call to unexpected() which usually calls terminate().
1210 LocaleDataImpl::getHangingCharacters( const Locale& rLocale ) throw(RuntimeException)
1211 {
1212 MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale,
"getForbiddenCharacters" ));
1213
1214 if ( func ) {
1215 sal_Int16 LCForbiddenCharactersCount = 0;
** CID 1338601: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1268 in
com::sun::star::i18n::LocaleDataImpl::getContinuousNumberingLevels(const
com::sun::star::lang::Locale &)()
________________________________________________________________________________________________________
*** CID 1338601: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1268 in
com::sun::star::i18n::LocaleDataImpl::getContinuousNumberingLevels(const
com::sun::star::lang::Locale &)()
1262 return seq1;
1263 }
1264 }
1265
1266
1267 Sequence< Sequence<beans::PropertyValue> > SAL_CALL
CID 1338601: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a
call to unexpected() which usually calls terminate().
1268 LocaleDataImpl::getContinuousNumberingLevels( const lang::Locale& rLocale )
throw(RuntimeException)
1269 {
1270 // load symbol
1271 MyFunc_Type2 func = reinterpret_cast<MyFunc_Type2>(getFunctionSymbol( rLocale,
"getContinuousNumberingLevels" ));
1272
1273 if ( func )
** CID 1338600: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1380 in
com::sun::star::i18n::LocaleDataImpl::getOutlineNumberingLevels(const com::sun::star::lang::Locale
&)()
________________________________________________________________________________________________________
*** CID 1338600: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1380 in
com::sun::star::i18n::LocaleDataImpl::getOutlineNumberingLevels(const com::sun::star::lang::Locale
&)()
1374 //XElementAccess
1375 virtual Type SAL_CALL getElementType( ) throw(RuntimeException, std::exception)
override;
1376 virtual sal_Bool SAL_CALL hasElements( ) throw(RuntimeException, std::exception)
override;
1377 };
1378
1379 Sequence< Reference<container::XIndexAccess> > SAL_CALL
CID 1338600: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a
call to unexpected() which usually calls terminate().
1380 LocaleDataImpl::getOutlineNumberingLevels( const lang::Locale& rLocale )
throw(RuntimeException)
1381 {
1382 // load symbol
1383 MyFunc_Type3 func = reinterpret_cast<MyFunc_Type3>(getFunctionSymbol( rLocale,
"getOutlineNumberingLevels" ));
1384
1385 if ( func )
** CID 1338599: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 934 in
com::sun::star::i18n::LocaleDataImpl::getCollatorRuleByAlgorithm(const com::sun::star::lang::Locale
&, const rtl::OUString &)()
________________________________________________________________________________________________________
*** CID 1338599: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 934 in
com::sun::star::i18n::LocaleDataImpl::getCollatorRuleByAlgorithm(const com::sun::star::lang::Locale
&, const rtl::OUString &)()
928 #define COLLATOR_OFFSET_ALGO 0
929 #define COLLATOR_OFFSET_DEFAULT 1
930 #define COLLATOR_OFFSET_RULE 2
931 #define COLLATOR_ELEMENTS 3
932
933 OUString SAL_CALL
CID 1338599: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a
call to unexpected() which usually calls terminate().
934 LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUString&
algorithm ) throw(RuntimeException)
935 {
936 MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale,
"getCollatorImplementation" ));
937 if ( func ) {
938 sal_Int16 collatorCount = 0;
939 sal_Unicode **collatorArray = func(collatorCount);
** CID 1338598: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1224 in
com::sun::star::i18n::LocaleDataImpl::getBreakIteratorRules(const com::sun::star::lang::Locale &)()
________________________________________________________________________________________________________
*** CID 1338598: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1224 in
com::sun::star::i18n::LocaleDataImpl::getBreakIteratorRules(const com::sun::star::lang::Locale &)()
1218 }
1219
1220 return OUString();
1221 }
1222
1223 Sequence< OUString > SAL_CALL
CID 1338598: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a
call to unexpected() which usually calls terminate().
1224 LocaleDataImpl::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeException)
1225 {
1226 MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale,
"getBreakIteratorRules" ));
1227
1228 if ( func ) {
1229 sal_Int16 LCBreakIteratorRuleCount = 0;
** CID 1338597: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1105 in
com::sun::star::i18n::LocaleDataImpl::getUnicodeScripts(const com::sun::star::lang::Locale &)()
________________________________________________________________________________________________________
*** CID 1338597: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1105 in
com::sun::star::i18n::LocaleDataImpl::getUnicodeScripts(const com::sun::star::lang::Locale &)()
1099 {
1100 sal_Unicode **indexArray = getIndexArrayForAlgorithm(rLocale, algorithm);
1101 return indexArray ? OUString(indexArray[1]) : OUString();
1102 }
1103
1104 Sequence< UnicodeScript > SAL_CALL
CID 1338597: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a
call to unexpected() which usually calls terminate().
1105 LocaleDataImpl::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeException)
1106 {
1107 MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale,
"getUnicodeScripts" ));
1108
1109 if ( func ) {
1110 sal_Int16 scriptCount = 0;
** CID 1338596: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1125 in
com::sun::star::i18n::LocaleDataImpl::getFollowPageWords(const com::sun::star::lang::Locale &)()
________________________________________________________________________________________________________
*** CID 1338596: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 1125 in
com::sun::star::i18n::LocaleDataImpl::getFollowPageWords(const com::sun::star::lang::Locale &)()
1119 Sequence< UnicodeScript > seq1(0);
1120 return seq1;
1121 }
1122 }
1123
1124 Sequence< OUString > SAL_CALL
CID 1338596: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a
call to unexpected() which usually calls terminate().
1125 LocaleDataImpl::getFollowPageWords( const Locale& rLocale ) throw(RuntimeException)
1126 {
1127 MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale,
"getFollowPageWords" ));
1128
1129 if ( func ) {
1130 sal_Int16 wordCount = 0;
** CID 1338595: (REVERSE_INULL)
/sw/source/core/layout/laycache.cxx: 271 in SwLayoutCache::Write(SvStream &, const SwDoc &)()
/sw/source/core/layout/laycache.cxx: 271 in SwLayoutCache::Write(SvStream &, const SwDoc &)()
________________________________________________________________________________________________________
*** CID 1338595: (REVERSE_INULL)
/sw/source/core/layout/laycache.cxx: 271 in SwLayoutCache::Write(SvStream &, const SwDoc &)()
265 break;
266 }
267 } while ( pTab->GetFollow() );
268 }
269 else
270 break;
CID 1338595: (REVERSE_INULL)
Null-checking "pTab" suggests that it may be null, but it has already been dereferenced on
all paths leading to the check.
271 } while( pTab );
272 }
273 }
274 }
275 if( pPage->GetSortedObjs() )
276 {
/sw/source/core/layout/laycache.cxx: 271 in SwLayoutCache::Write(SvStream &, const SwDoc &)()
265 break;
266 }
267 } while ( pTab->GetFollow() );
268 }
269 else
270 break;
CID 1338595: (REVERSE_INULL)
Null-checking "pTab" suggests that it may be null, but it has already been dereferenced on
all paths leading to the check.
271 } while( pTab );
272 }
273 }
274 }
275 if( pPage->GetSortedObjs() )
276 {
** CID 1338594: Control flow issues (MISSING_BREAK)
/sd/source/filter/eppt/pptx-epptooxml.cxx: 552 in
oox::core::PowerPointExport::WriteTransition(std::shared_ptr<sax_fastparser::FastSerializerHelper>)()
________________________________________________________________________________________________________
*** CID 1338594: Control flow issues (MISSING_BREAK)
/sd/source/filter/eppt/pptx-epptooxml.cxx: 552 in
oox::core::PowerPointExport::WriteTransition(std::shared_ptr<sax_fastparser::FastSerializerHelper>)()
546 {
547 nTransition = XML_cut;
548 pThruBlk = "true";
549 bOOXmlSpecificTransition = true;
550 }
551 }
CID 1338594: Control flow issues (MISSING_BREAK)
The above case falls through to this one.
552 case animations::TransitionType::MISCSHAPEWIPE:
553 {
554 switch(nTransitionSubtype)
555 {
556 case animations::TransitionSubType::TOPTOBOTTOM: // Turn around
557 nTransition = XML_fade;
** CID 1338593: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1338593: Null pointer dereferences (FORWARD_NULL)
/javaunohelper/source/javaunohelper.cxx: 75 in
Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo()
69 osl::Module lib(aLibName, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL);
70 if (lib.is())
71 {
72 lib.release();
73
74 // ========================= LATEST VERSION =========================
CID 1338593: Null pointer dereferences (FORWARD_NULL)
"getFunctionSymbol" dereferences null "lib.m_Module".
75 oslGenericFunction pSym = lib.getFunctionSymbol(COMPONENT_GETENV);
76 if (pSym)
77 {
78 Environment java_env, loader_env;
79
80 const sal_Char * pEnvTypeName = nullptr;
** CID 1338592: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1338592: Null pointer dereferences (FORWARD_NULL)
/javaunohelper/source/javaunohelper.cxx: 165 in
Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory()
159 osl::Module lib(aLibName, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL);
160 if (lib.is())
161 {
162 lib.release();
163
164 // ========================= LATEST VERSION =========================
CID 1338592: Null pointer dereferences (FORWARD_NULL)
"getFunctionSymbol" dereferences null "lib.m_Module".
165 oslGenericFunction pSym = lib.getFunctionSymbol(COMPONENT_GETENV);
166 if (pSym)
167 {
168 Environment java_env, loader_env;
169
170 const sal_Char * pEnvTypeName = nullptr;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://scan.coverity.com/projects/libreoffice?tab=overview
To manage Coverity Scan email notifications for "libreoffice@lists.freedesktop.org", click
https://scan.coverity.com/subscriptions/edit?email=libreoffice%40lists.freedesktop.org&token=d6481d718a775246b2340f282ebe5939
Context
- New Defects reported by Coverity Scan for LibreOffice · scan-admin
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.