From 11425fd623f6375937b3d97c8d682506cc08d39a Mon Sep 17 00:00:00 2001 From: Roy Shea Date: Mon, 7 Jul 2008 16:13:33 -0700 Subject: [PATCH] wintrust/test: Verify array length before calling memcmp in test (RESEND 2) Whitespace fixed. --- dlls/wintrust/tests/crypt.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/wintrust/tests/crypt.c b/dlls/wintrust/tests/crypt.c index c28f98c..a45f853 100644 --- a/dlls/wintrust/tests/crypt.c +++ b/dlls/wintrust/tests/crypt.c @@ -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); -- 1.5.4.5