wintrust/test: Verify array length before calling memcmp in test.
This commit is contained in:
parent
e095a08a38
commit
363516d7c3
|
@ -335,7 +335,9 @@ static void test_calchash(void)
|
|||
{
|
||||
ok(GetLastError() == ERROR_SUCCESS,
|
||||
"Expected ERROR_SUCCESS, got %d\n", GetLastError());
|
||||
ok(!memcmp(hash, expectedhash, sizeof(expectedhash)), "Hashes didn't match\n");
|
||||
ok(hashsize == sizeof(expectedhash) &&
|
||||
!memcmp(hash, expectedhash, sizeof(expectedhash)),
|
||||
"Hashes didn't match\n");
|
||||
}
|
||||
CloseHandle(file);
|
||||
|
||||
|
|
Loading…
Reference in New Issue