- Report a failure for FindNextFile(NULL) instead of crashing.

svn path=/trunk/; revision=9371
This commit is contained in:
Filip Navara 2004-05-13 20:32:18 +00:00
parent 620a45896a
commit 624300da51

View file

@ -1,4 +1,4 @@
/* $Id: find.c,v 1.43 2004/01/23 21:16:03 ekohl Exp $
/* $Id: find.c,v 1.44 2004/05/13 20:32:18 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -48,6 +48,14 @@ InternalFindNextFile (
IO_STATUS_BLOCK IoStatusBlock;
NTSTATUS Status;
DPRINT("InternalFindNextFile(%lx)\n", hFindFile);
if (hFindFile == NULL)
{
SetLastError (ERROR_INVALID_HANDLE);
return FALSE;
}
IData = (PKERNEL32_FIND_FILE_DATA)hFindFile;
if (IData->pFileInfo->NextEntryOffset != 0)