sync parameter validation for SearchPath with wine 1.1.40
svn path=/trunk/; revision=46214
DWORD RetValue = 0;
NTSTATUS Status = STATUS_SUCCESS;
+ if (!lpFileName)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
RtlInitAnsiString (&Path,
(LPSTR)lpPath);
RtlInitAnsiString (&FileName,
{
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))
{