wbemprox: Fix corner cases in IEnumWbemClassObject::Skip.

This commit is contained in:
Hans Leidekker 2012-07-25 13:12:42 +02:00 committed by Alexandre Julliard
parent 0f11ac361e
commit 2c5da008f7
1 changed files with 3 additions and 1 deletions

View File

@ -167,7 +167,9 @@ static HRESULT WINAPI enum_class_object_Skip(
if (lTimeout != WBEM_INFINITE) FIXME("timeout not supported\n");
if (ec->index + nCount >= view->count)
if (!view->count) return WBEM_S_FALSE;
if (nCount > view->count - ec->index)
{
ec->index = view->count - 1;
return WBEM_S_FALSE;