oleaut32: GetTypeInfoType - Return TYPE_E_ELEMENTNOTFOUND if index out of bounds.

This commit is contained in:
Stefan Siebert 2006-08-03 17:54:06 +02:00 committed by Alexandre Julliard
parent f740a28062
commit 9776f5b83f
1 changed files with 3 additions and 0 deletions

View File

@ -3602,6 +3602,9 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoType(
ITypeLibImpl *This = (ITypeLibImpl *)iface; ITypeLibImpl *This = (ITypeLibImpl *)iface;
int i; int i;
ITypeInfoImpl *pTInfo = This->pTypeInfo; ITypeInfoImpl *pTInfo = This->pTypeInfo;
if ((ITypeLib2_fnGetTypeInfoCount(iface) < index + 1) || (index < 0))
return TYPE_E_ELEMENTNOTFOUND;
TRACE("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);