Roy Shea : wintrust/test: Verify array length before calling memcmp in test .
Alexandre Julliard
julliard at winehq.org
Tue Jul 8 06:11:02 CDT 2008
Module: wine
Branch: master
Commit: 363516d7c394dac611468942a38567fc97de6a28
URL: http://source.winehq.org/git/wine.git/?a=commit;h=363516d7c394dac611468942a38567fc97de6a28
Author: Roy Shea <royshea at gmail.com>
Date: Mon Jul 7 16:13:33 2008 -0700
wintrust/test: Verify array length before calling memcmp in test.
---
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);
More information about the wine-cvs
mailing list