Skip to content

Commit 5bf1f1b

Browse files
committed
u2f: clang-tidy lint bugprone-not-null-terminated-result
1 parent ba4e840 commit 5bf1f1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/u2f.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,8 @@ static void _authenticate_continue(const USB_APDU* apdu, Packet* out_packet)
696696
size_t auth_packet_len = sizeof(U2F_AUTHENTICATE_RESP) - U2F_MAX_EC_SIG_SIZE + der_len;
697697

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

701702
_fill_message(buf, auth_packet_len + 2, out_packet);
702703
}

0 commit comments

Comments
 (0)