diff --git a/firmware/messages.c b/firmware/messages.c index 6db0d54db..d290da779 100644 --- a/firmware/messages.c +++ b/firmware/messages.c @@ -314,7 +314,16 @@ const uint8_t *msg_debug_out_data(void) #endif -CONFIDENTIAL uint8_t msg_tiny[64]; +CONFIDENTIAL uint8_t msg_tiny[128]; +_Static_assert(sizeof(msg_tiny) >= sizeof(Cancel), "msg_tiny too tiny"); +_Static_assert(sizeof(msg_tiny) >= sizeof(Initialize), "msg_tiny too tiny"); +_Static_assert(sizeof(msg_tiny) >= sizeof(PassphraseAck), "msg_tiny too tiny"); +_Static_assert(sizeof(msg_tiny) >= sizeof(ButtonAck), "msg_tiny too tiny"); +_Static_assert(sizeof(msg_tiny) >= sizeof(PinMatrixAck), "msg_tiny too tiny"); +#if DEBUG_LINK +_Static_assert(sizeof(msg_tiny) >= sizeof(DebugLinkDecision), "msg_tiny too tiny"); +_Static_assert(sizeof(msg_tiny) >= sizeof(DebugLinkGetState), "msg_tiny too tiny"); +#endif uint16_t msg_tiny_id = 0xFFFF; void msg_read_tiny(const uint8_t *buf, int len) diff --git a/firmware/messages.h b/firmware/messages.h index e0a5c8b6f..ace4a4448 100644 --- a/firmware/messages.h +++ b/firmware/messages.h @@ -47,7 +47,7 @@ bool msg_write_common(char type, uint16_t msg_id, const void *msg_ptr); void msg_read_tiny(const uint8_t *buf, int len); void msg_debug_read_tiny(const uint8_t *buf, int len); -extern uint8_t msg_tiny[64]; +extern uint8_t msg_tiny[128]; extern uint16_t msg_tiny_id; #endif