Commit 363516d7 authored by Roy Shea's avatar Roy Shea Committed by Alexandre Julliard

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

parent e095a08a
...@@ -335,7 +335,9 @@ static void test_calchash(void) ...@@ -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);
......
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