wintrust/test: Verify array length before calling memcmp in test.

This commit is contained in:
Roy Shea 2008-07-07 16:13:33 -07:00 committed by Alexandre Julliard
parent e095a08a38
commit 363516d7c3
1 changed files with 3 additions and 1 deletions

View File

@ -335,7 +335,9 @@ static void test_calchash(void)
{ {
ok(GetLastError() == ERROR_SUCCESS, ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %d\n", GetLastError()); "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); CloseHandle(file);