From faae5a909c9f39199962aa7822a9517ae379b6d1 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Wed, 4 May 2022 11:37:16 +0200 Subject: [PATCH] Fix PIC crashes --- src_features/signMessageEIP712/sol_typenames.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src_features/signMessageEIP712/sol_typenames.c b/src_features/signMessageEIP712/sol_typenames.c index 25c704f..11a24ae 100644 --- a/src_features/signMessageEIP712/sol_typenames.c +++ b/src_features/signMessageEIP712/sol_typenames.c @@ -4,6 +4,7 @@ #include "eip712.h" #include "context.h" #include "mem.h" +#include "os_pic.h" // Bit indicating they are more types associated to this typename #define TYPENAME_MORE_TYPE (1 << 7) @@ -77,14 +78,14 @@ bool init_sol_typenames(void) return false; } // get pointer to the allocated space just above - *typename_len_ptr = strlen(typenames[s_idx]); + *typename_len_ptr = strlen(PIC(typenames[s_idx])); if ((typename_ptr = mem_alloc(sizeof(char) * *typename_len_ptr)) == NULL) { return false; } // copy typename - memcpy(typename_ptr, typenames[s_idx], *typename_len_ptr); + memcpy(typename_ptr, PIC(typenames[s_idx]), *typename_len_ptr); } // increment array size *typenames_array += 1;