From 36f3b7fe0959b75f9b2ebceb3ed0d53c7e3c58f9 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 4 Sep 2017 12:03:10 +0000 Subject: [PATCH] firmware: mark usb buffer variables confidential --- firmware/messages.c | 6 +++--- firmware/usb.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/messages.c b/firmware/messages.c index 15c510bd9..d8411bfa8 100644 --- a/firmware/messages.c +++ b/firmware/messages.c @@ -222,7 +222,7 @@ enum { void msg_process(char type, uint16_t msg_id, const pb_field_t *fields, uint8_t *msg_raw, uint32_t msg_size) { - static uint8_t msg_data[MSG_IN_SIZE]; + static CONFIDENTIAL uint8_t msg_data[MSG_IN_SIZE]; memset(msg_data, 0, sizeof(msg_data)); pb_istream_t stream = pb_istream_from_buffer(msg_raw, msg_size); bool status = pb_decode(&stream, fields, msg_data); @@ -236,7 +236,7 @@ void msg_process(char type, uint16_t msg_id, const pb_field_t *fields, uint8_t * void msg_read_common(char type, const uint8_t *buf, int len) { static char read_state = READSTATE_IDLE; - static uint8_t msg_in[MSG_IN_SIZE]; + static CONFIDENTIAL uint8_t msg_in[MSG_IN_SIZE]; static uint16_t msg_id = 0xFFFF; static uint32_t msg_size = 0; static uint32_t msg_pos = 0; @@ -304,7 +304,7 @@ const uint8_t *msg_debug_out_data(void) #endif -uint8_t msg_tiny[64]; +CONFIDENTIAL uint8_t msg_tiny[64]; uint16_t msg_tiny_id = 0xFFFF; void msg_read_tiny(const uint8_t *buf, int len) diff --git a/firmware/usb.c b/firmware/usb.c index deae841d6..55bd09517 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -343,7 +343,7 @@ static volatile char tiny = 0; static void hid_rx_callback(usbd_device *dev, uint8_t ep) { (void)ep; - static uint8_t buf[64] __attribute__ ((aligned(4))); + static CONFIDENTIAL uint8_t buf[64] __attribute__ ((aligned(4))); if ( usbd_ep_read_packet(dev, ENDPOINT_ADDRESS_OUT, buf, 64) != 64) return; debugLog(0, "", "hid_rx_callback"); if (!tiny) { @@ -356,7 +356,7 @@ static void hid_rx_callback(usbd_device *dev, uint8_t ep) static void hid_u2f_rx_callback(usbd_device *dev, uint8_t ep) { (void)ep; - static uint8_t buf[64] __attribute__ ((aligned(4))); + static CONFIDENTIAL uint8_t buf[64] __attribute__ ((aligned(4))); debugLog(0, "", "hid_u2f_rx_callback"); if ( usbd_ep_read_packet(dev, ENDPOINT_ADDRESS_U2F_OUT, buf, 64) != 64) return; @@ -367,7 +367,7 @@ static void hid_u2f_rx_callback(usbd_device *dev, uint8_t ep) static void hid_debug_rx_callback(usbd_device *dev, uint8_t ep) { (void)ep; - static uint8_t buf[64] __attribute__ ((aligned(4))); + static CONFIDENTIAL uint8_t buf[64] __attribute__ ((aligned(4))); if ( usbd_ep_read_packet(dev, ENDPOINT_ADDRESS_DEBUG_OUT, buf, 64) != 64) return; debugLog(0, "", "hid_debug_rx_callback"); if (!tiny) {