summaryrefslogtreecommitdiffstats
path: root/cppuhelper/source/interfacecontainer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/source/interfacecontainer.cxx')
-rw-r--r--cppuhelper/source/interfacecontainer.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx
index 035f93848bf2..c97a8ba9908c 100644
--- a/cppuhelper/source/interfacecontainer.cxx
+++ b/cppuhelper/source/interfacecontainer.cxx
@@ -22,6 +22,7 @@
#include <cppuhelper/propshlp.hxx>
#include <comphelper/sequence.hxx>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <sal/log.hxx>
@@ -106,7 +107,7 @@ void OInterfaceIteratorHelper::remove()
if( bIsList )
{
OSL_ASSERT( nRemain >= 0 &&
- nRemain < static_cast<sal_Int32>(aData.pAsVector->size()) );
+ o3tl::make_unsigned(nRemain) < aData.pAsVector->size() );
XInterface * p = (*aData.pAsVector)[nRemain].get();
rCont.removeInterface( * reinterpret_cast< const Reference< XInterface > * >( &p ) );
}