EIP712 STRUCT FIELD IMPL now checks the APDU payload bounds

This commit is contained in:
Alexandre Paillier
2022-07-18 11:31:46 +02:00
parent 38f199e46b
commit 5e5b3c3621
4 changed files with 23 additions and 13 deletions

View File

@@ -116,7 +116,8 @@ bool handle_eip712_struct_impl(const uint8_t *const apdu_buf)
}
break;
case P2_ARRAY:
ret = path_new_array_depth(apdu_buf[OFFSET_CDATA]);
ret = path_new_array_depth(&apdu_buf[OFFSET_CDATA],
apdu_buf[OFFSET_LC]);
break;
default:
PRINTF("Unknown P2 0x%x for APDU 0x%x\n",