fixed uninitialized buffer
This commit is contained in:
parent
f4946df4e9
commit
1b880b5675
|
@ -599,6 +599,8 @@ static int cardos_construct_fcp(sc_card_t *card, const sc_file_t *file,
|
||||||
/* we will add the length later */
|
/* we will add the length later */
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
|
memset(buf, 0, sizeof(buf));
|
||||||
|
|
||||||
/* set the length */
|
/* set the length */
|
||||||
buf[0] = (file->size >> 8) & 0xff;
|
buf[0] = (file->size >> 8) & 0xff;
|
||||||
buf[1] = file->size & 0xff;
|
buf[1] = file->size & 0xff;
|
||||||
|
|
|
@ -743,6 +743,7 @@ static int gids_set_security_env(sc_card_t *card,
|
||||||
assert(card != NULL && env != NULL);
|
assert(card != NULL && env != NULL);
|
||||||
|
|
||||||
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_NORMAL);
|
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_NORMAL);
|
||||||
|
memset(sbuf, 0, sizeof(sbuf));
|
||||||
|
|
||||||
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, INS_MANAGE_SECURITY_ENVIRONMENT, P1_DECIPHERMENT_INTERNAL_AUTHENTICATE_KEY_AGREEMENT, 0);
|
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, INS_MANAGE_SECURITY_ENVIRONMENT, P1_DECIPHERMENT_INTERNAL_AUTHENTICATE_KEY_AGREEMENT, 0);
|
||||||
switch (env->operation) {
|
switch (env->operation) {
|
||||||
|
|
Loading…
Reference in New Issue