diff options
Diffstat (limited to 'trust/tests')
-rw-r--r-- | trust/tests/Makefile.am | 3 | ||||
-rw-r--r-- | trust/tests/test-module.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/trust/tests/Makefile.am b/trust/tests/Makefile.am index fa70120..a964948 100644 --- a/trust/tests/Makefile.am +++ b/trust/tests/Makefile.am @@ -47,7 +47,6 @@ frob_nss_trust_LDADD = \ TESTS = $(CHECK_PROGS:=$(EXEEXT)) EXTRA_DIST = \ - anchors \ - certificates \ + input \ files \ $(NULL) diff --git a/trust/tests/test-module.c b/trust/tests/test-module.c index 52eafe0..45af62a 100644 --- a/trust/tests/test-module.c +++ b/trust/tests/test-module.c @@ -148,6 +148,7 @@ test_get_slot_info (CuTest *cu) CK_SLOT_INFO info; char description[64]; CK_ULONG count; + size_t length; CK_RV rv; int i; @@ -170,8 +171,10 @@ test_get_slot_info (CuTest *cu) CuAssertIntEquals (cu, CKR_OK, rv); memset (description, ' ', sizeof (description)); - assert (strlen (paths[i]) <= sizeof (description)); - memcpy (description, paths[i], strlen (paths[i])); + length = strlen(paths[i]); + if (length > sizeof (description)) + length = sizeof (description); + memcpy (description, paths[i], length); CuAssertTrue (cu, memcmp (info.slotDescription, description, sizeof (description)) == 0); } |