diff options
author | Stef Walter <stefw@gnome.org> | 2013-03-15 20:50:17 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-03-15 20:50:45 +0100 |
commit | 062c09fbcad6945d6c40c5f2ce47894abdf87b07 (patch) | |
tree | a029f15d7e5dd572edb56ee6b5ed4284f324c255 /trust/tests | |
parent | 57e835d55f6eae39c25b97e35efe0cb58e46b897 (diff) |
Fix distcheck and documentation
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); } |