Fix test cases: uninitialized memory and non-terminated string compare
This commit is contained in:
@@ -182,6 +182,7 @@ CK_RV create_token(ykpiv_state *state, CK_BYTE_PTR p, ykcs11_slot_t *slot) {
|
||||
|
||||
t_info->ulFreePrivateMemory = CK_UNAVAILABLE_INFORMATION;
|
||||
|
||||
memset(&t_info->hardwareVersion, 0, sizeof(t_info->hardwareVersion));
|
||||
// Ignore hardware version, report firmware version
|
||||
if (token.get_token_version(state, &t_info->firmwareVersion) != CKR_OK) {
|
||||
ykpiv_disconnect(state);
|
||||
|
||||
Reference in New Issue
Block a user