diff options
author | nicoo <nicoo@debian.org> | 2020-02-23 15:31:16 +0100 |
---|---|---|
committer | Nicolas Braud-Santoni <nicolas@braud-santoni.eu> | 2020-02-23 15:31:16 +0100 |
commit | c923f422b1e455bdd8ec3bdb10d005e3bfbacfe0 (patch) | |
tree | fdc9b1a9da716cf0ad70efbeafaf62151f997064 /src | |
parent | c79050aa44b8836d836c5dd22a383a073c28b74b (diff) |
New upstream version 1.3.1
Diffstat (limited to 'src')
-rw-r--r-- | src/iso7816.c | 2 | ||||
-rw-r--r-- | src/u2f.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/iso7816.c b/src/iso7816.c index e2ea281..a3fd280 100644 --- a/src/iso7816.c +++ b/src/iso7816.c | |||
@@ -13,7 +13,7 @@ iso7816_new(uint8_t ins, uint8_t p1, uint16_t payload_len) | |||
13 | iso7816_apdu_t *apdu; | 13 | iso7816_apdu_t *apdu; |
14 | size_t alloc_len; | 14 | size_t alloc_len; |
15 | 15 | ||
16 | alloc_len = sizeof(iso7816_apdu_t) + payload_len; | 16 | alloc_len = sizeof(iso7816_apdu_t) + payload_len + 2; /* le1 le2 */ |
17 | 17 | ||
18 | if ((apdu = calloc(1, alloc_len)) == NULL) | 18 | if ((apdu = calloc(1, alloc_len)) == NULL) |
19 | return (NULL); | 19 | return (NULL); |
@@ -439,7 +439,7 @@ encode_cred_authdata(const char *rp_id, const uint8_t *kh, uint8_t kh_len, | |||
439 | authdata.sigcount = 0; | 439 | authdata.sigcount = 0; |
440 | 440 | ||
441 | memset(&attcred_raw.aaguid, 0, sizeof(attcred_raw.aaguid)); | 441 | memset(&attcred_raw.aaguid, 0, sizeof(attcred_raw.aaguid)); |
442 | attcred_raw.id_len = (uint16_t)(kh_len << 8); /* XXX */ | 442 | attcred_raw.id_len = htobe16(kh_len); |
443 | 443 | ||
444 | len = authdata_blob.len = sizeof(authdata) + sizeof(attcred_raw) + | 444 | len = authdata_blob.len = sizeof(authdata) + sizeof(attcred_raw) + |
445 | kh_len + pk_blob.len; | 445 | kh_len + pk_blob.len; |