Skip to content

Commit

Permalink
u2f: clang-tidy lint bugprone-not-null-terminated-result
Browse files Browse the repository at this point in the history
  • Loading branch information
NickeZ committed Sep 2, 2024
1 parent ba4e840 commit 5bf1f1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/u2f.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,8 @@ static void _authenticate_continue(const USB_APDU* apdu, Packet* out_packet)
size_t auth_packet_len = sizeof(U2F_AUTHENTICATE_RESP) - U2F_MAX_EC_SIG_SIZE + der_len;

// Append success bytes
memcpy(buf + auth_packet_len, "\x90\x00", 2);
uint8_t success_bytes[] = {0x90, 0x00};
memcpy(buf + auth_packet_len, success_bytes, sizeof(success_bytes));

_fill_message(buf, auth_packet_len + 2, out_packet);
}
Expand Down

0 comments on commit 5bf1f1b

Please sign in to comment.