msi: Verify the szFilePath parameter of MsiGetFileHash.

This commit is contained in:
James Hawkins 2007-11-25 17:58:57 -06:00 committed by Alexandre Julliard
parent ef7d16c816
commit e100288934
2 changed files with 8 additions and 8 deletions

View File

@ -2277,6 +2277,12 @@ UINT WINAPI MsiGetFileHashW( LPCWSTR szFilePath, DWORD dwOptions,
TRACE("%s %08x %p\n", debugstr_w(szFilePath), dwOptions, pHash );
if (!szFilePath)
return ERROR_INVALID_PARAMETER;
if (!*szFilePath)
return ERROR_PATH_NOT_FOUND;
if (dwOptions)
return ERROR_INVALID_PARAMETER;
if (!pHash)

View File

@ -287,17 +287,11 @@ static void test_MsiGetFileHash(void)
/* szFilePath is NULL */
r = pMsiGetFileHashA(NULL, 0, &hash);
todo_wine
{
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
}
ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r);
/* szFilePath is empty */
r = pMsiGetFileHashA("", 0, &hash);
todo_wine
{
ok(r == ERROR_PATH_NOT_FOUND, "Expected ERROR_PATH_NOT_FOUND, got %d\n", r);
}
ok(r == ERROR_PATH_NOT_FOUND, "Expected ERROR_PATH_NOT_FOUND, got %d\n", r);
/* szFilePath is nonexistent */
r = pMsiGetFileHashA(name, 0, &hash);