From e2a1d1c49117e3321a59daff35500394a7e60cda Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 14 Jan 2013 18:27:43 +0100 Subject: uno::Sequence: assert on negative length Change-Id: Ie94a6042863bb0d91f2b61ac8a048182aea41c0a --- cppu/inc/com/sun/star/uno/Sequence.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'cppu') diff --git a/cppu/inc/com/sun/star/uno/Sequence.hxx b/cppu/inc/com/sun/star/uno/Sequence.hxx index 498109a0321c..3a006a654e5c 100644 --- a/cppu/inc/com/sun/star/uno/Sequence.hxx +++ b/cppu/inc/com/sun/star/uno/Sequence.hxx @@ -89,6 +89,7 @@ inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) template< class E > inline Sequence< E >::Sequence( sal_Int32 len ) { + assert( len >= 0 ); const Type & rType = ::cppu::getTypeFavourUnsigned( this ); #if ! defined EXCEPTIONS_OFF sal_Bool success = -- cgit