mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 00:28:56 +00:00
[KERNEL32]
sync parameter validation for SearchPath with wine 1.1.40 svn path=/trunk/; revision=46214
This commit is contained in:
parent
d70bf73ec1
commit
5ca64ba60f
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue