Skip to content

Commit

Permalink
src/apdu-signature: initialize nlen as size_t in cmp_name
Browse files Browse the repository at this point in the history
  • Loading branch information
pinheadmz committed May 5, 2021
1 parent 948dcb6 commit 5a60024
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apdu-signature.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ cmp_name(
uint8_t *name_len
) {
uint8_t n[64];
uint8_t nlen;
size_t nlen;
uint8_t digest[32];

if (!read_varbytes(buf, len, n, 63, (size_t *)&nlen))
if (!read_varbytes(buf, len, n, 63, &nlen))
return false;

if (nlen < 1 || nlen > 63)
Expand Down

0 comments on commit 5a60024

Please sign in to comment.