Skip to content

Commit

Permalink
fuzz: more initialized memory
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgeana committed Oct 1, 2024
1 parent c2b23d3 commit 4f6af41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkcs11/fuzz/fuzz_get_attribute_value.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ void derive_ecdh_session_keys(uint8_t derived_key_count,
}

for (int i = 0; i < derived_key_count; i++) {
CK_OBJECT_HANDLE ecdh;
CK_OBJECT_HANDLE ecdh = {0};

CK_ECDH1_DERIVE_PARAMS params;
CK_ECDH1_DERIVE_PARAMS params = {0};
memset(&params, 0, sizeof(params));
params.kdf = CKD_NULL;
params.pSharedData = NULL;
Expand All @@ -147,7 +147,7 @@ void derive_ecdh_session_keys(uint8_t derived_key_count,
params.pPublicData = new uint8_t[50];
params.ulPublicDataLen = 50;

CK_MECHANISM mechanism;
CK_MECHANISM mechanism = {0};
memset(&mechanism, 0, sizeof(mechanism));
mechanism.mechanism = CKM_ECDH1_DERIVE;
mechanism.pParameter = (void *) &params;
Expand Down

0 comments on commit 4f6af41

Please sign in to comment.