Skip to content

Commit

Permalink
coolkey: Initialize potentially uninitialized memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakuje committed Mar 24, 2021
1 parent 9cc942f commit 7114fb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libopensc/pkcs15-coolkey.c
Expand Up @@ -425,7 +425,8 @@ coolkey_get_public_key_from_certificate(sc_pkcs15_card_t *p15card, sc_cardctl_co
sc_pkcs15_pubkey_t *key = NULL;
int r;

cert_info.value.value = NULL;
memset(&cert_info, 0, sizeof(cert_info));

r = coolkey_get_certificate(p15card->card, obj, &cert_info.value);
if (r < 0) {
goto fail;
Expand Down

0 comments on commit 7114fb7

Please sign in to comment.