diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index ddc8afcda681..295ca5a034e9 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -1466,6 +1466,7 @@ OUString cppuhelper::ServiceManager::readLegacyRdbString( } OUString val; std::vector< char > v(s); // assuming sal_uInt32 fits into vector::size_type + assert(s > 0 && "throw above otherwise"); if (subkey.getValue(OUString(), v.data()) != RegError::NO_ERROR || v.back() != '\0' || !rtl_convertStringToUString( diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 6907a2dcaaf5..04db1bf78dca 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2983,6 +2983,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( for (size_t n = 0; n < nCount; ++n) { sal_uInt16 nId = m_xTbSymbol->GetItemId( n ); + assert(nId > 0 && "otherwise totally broken"); if ( m_xTbSymbol->GetItemText( nId ) == aURL ) {