From f7d194e55905b09f652b2316933aff76a82d23ea Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 3 Mar 2017 11:09:27 +0100 Subject: [PATCH] h5: use correct scope for temp control message buffer --- src/hci_transport_h5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hci_transport_h5.c b/src/hci_transport_h5.c index 23358345a..c22c2c5bf 100644 --- a/src/hci_transport_h5.c +++ b/src/hci_transport_h5.c @@ -279,9 +279,9 @@ static void hci_transport_link_calc_header(uint8_t * header, static void hci_transport_link_send_control(const uint8_t * message, int message_len){ uint8_t header[4]; hci_transport_link_calc_header(header, 0, 0, link_peer_supports_data_integrity_check, 0, LINK_CONTROL_PACKET_TYPE, message_len); + uint8_t message_with_dic[LINK_CONTROL_MAX_LEN + 2]; if (link_peer_supports_data_integrity_check){ // append data integrity check value / need to copy control message - uint8_t message_with_dic[LINK_CONTROL_MAX_LEN + 2]; memcpy(message_with_dic, message, message_len); uint16_t dic = crc16_calc_for_slip_frame(header, message, message_len); big_endian_store_16(message_with_dic, message_len, dic);