diff --git a/ctap.c b/ctap.c index ab78ef2..d780673 100644 --- a/ctap.c +++ b/ctap.c @@ -763,7 +763,7 @@ void ctap_make_credential(CborEncoder * encoder, uint8_t * request, int length) printf("der sig [%d]: ", sigder_sz); dump_hex(sigder, sigder_sz); - ctap_add_attest_statement(&map, sigder, sigderlen); + ctap_add_attest_statement(&map, sigder, sigder_sz); ret = cbor_encoder_close_container(encoder, &map); check_ret(ret); diff --git a/ctaphid.c b/ctaphid.c index aa0bb00..2999653 100644 --- a/ctaphid.c +++ b/ctaphid.c @@ -185,7 +185,7 @@ static int buffer_len() static void ctaphid_write(CTAPHID_WRITE_BUFFER * wb, void * _data, int len) { uint8_t * data = (uint8_t *)_data; - if (len == 0) + if (_data == NULL) { if (wb->offset == 0 && wb->bytes_written == 0) {