msi: Verify the szFilePath parameter of MsiGetFileHash.
This commit is contained in:
parent
ef7d16c816
commit
e100288934
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/* szFilePath is empty */
|
||||
r = pMsiGetFileHashA("", 0, &hash);
|
||||
todo_wine
|
||||
{
|
||||
ok(r == ERROR_PATH_NOT_FOUND, "Expected ERROR_PATH_NOT_FOUND, got %d\n", r);
|
||||
}
|
||||
|
||||
/* szFilePath is nonexistent */
|
||||
r = pMsiGetFileHashA(name, 0, &hash);
|
||||
|
|
Loading…
Reference in New Issue