Skip to content

Commit

Permalink
p11_load: Initialize variable
Browse files Browse the repository at this point in the history
The uninitialized variable could be partially undefined if it's
not written completely in 'C_GetInfo()'

Signed-off-by: Jussi Keranen <[email protected]>
  • Loading branch information
Jussi Keranen authored and mtrojnar committed Aug 22, 2020
1 parent 71c3bae commit c8aca3b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/p11_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ int pkcs11_CTX_load(PKCS11_CTX *ctx, const char *name)
}

/* Get info on the library */
memset(&ck_info, 0, sizeof(ck_info));
rv = cpriv->method->C_GetInfo(&ck_info);
if (rv) {
cpriv->method->C_Finalize(NULL);
Expand Down

0 comments on commit c8aca3b

Please sign in to comment.