[KERNEL32]

sync parameter validation for SearchPath with wine 1.1.40

svn path=/trunk/; revision=46214
This commit is contained in:
Christoph von Wittich 2010-03-15 22:04:15 +00:00
parent d70bf73ec1
commit 5ca64ba60f

View file

@ -837,6 +837,12 @@ SearchPathA (
DWORD RetValue = 0;
NTSTATUS Status = STATUS_SUCCESS;
if (!lpFileName)
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
RtlInitAnsiString (&Path,
(LPSTR)lpPath);
RtlInitAnsiString (&FileName,
@ -985,6 +991,12 @@ SearchPathW(LPCWSTR lpPath,
{
DWORD ret = 0;
if (!lpFileName || !lpFileName[0])
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
/* If the name contains an explicit path, ignore the path */
if (ContainsPath(lpFileName))
{