Commit e1002889 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Verify the szFilePath parameter of MsiGetFileHash.

parent ef7d16c8
......@@ -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);
}
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment