From 0e9cd91ecc95d8c54d7ec03a2d503a98499de190 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Thu, 14 Apr 2022 15:25:38 +0200 Subject: [PATCH] Removed structure packing, prevents unaligned access --- src_features/signMessageEIP712/path.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src_features/signMessageEIP712/path.h b/src_features/signMessageEIP712/path.h index 3be4c5f..f9e1885 100644 --- a/src_features/signMessageEIP712/path.h +++ b/src_features/signMessageEIP712/path.h @@ -7,19 +7,19 @@ #define MAX_PATH_DEPTH 16 #define MAX_ARRAY_DEPTH 4 -typedef struct __attribute__((packed)) +typedef struct { uint8_t path_index; uint8_t size; } s_array_depth; -typedef struct __attribute__((packed)) +typedef struct { - const void *root_struct; uint8_t depth_count; uint8_t depths[MAX_PATH_DEPTH]; uint8_t array_depth_count; s_array_depth array_depths[MAX_ARRAY_DEPTH]; + const void *root_struct; } s_path; bool path_set_root(const char *const struct_name, uint8_t length);